Skip to content

Unreachable program point: streams #18212

Closed
@chongwick

Description

@chongwick

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions