Description
The following code:
<?php
$stream = fopen('php://memory', 'r+');
$result = fseek($stream, PHP_INT_MIN, SEEK_END);
var_dump($result);
Resulted in this output:
/Users/arshid/Downloads/php-src/main/streams/memory.c:168:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'zend_off_t' (aka 'long long'); cast to an unsigned type to negate this value to itself
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/arshid/Downloads/php-src/main/streams/memory.c:168:45
[4] 93646 abort sapi/cli/php z.php
But I expected this output instead:
PHP Version
PHP 8.6.0-dev (cli) (built: Jan 18 2026 08:54:52) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.6.0-dev, Copyright (c), by Zend Technologies