Closed
Description
Description
The following code:
<?php
$fp = fopen('php://input', 'r+');
for ($i = 1; $i < 10; $i++) {
fwrite($fp, chr(0x30 + $i));
var_dump(fseek($fp, -$i, SEEK_SET));
var_dump(fseek($fp, -$i, SEEK_CUR));
}
fclose($fp);
?>
Resulted in this output:
/home/w023dtc/nightly_php/php-src/main/streams/streams.c:1385:5: runtime error: execution reached an unreachable program point
But I expected this output instead:
PHP Version
nightly
Operating System
ubuntu 22.04