Description
The following code:
<?php
$text = 'abc';
$offset = 0;
$char = substr($text, $offset, $offset = strpos($text, 'b', $offset));
var_dump($char);
Resulted in this output with PHP 8.2.31 :
Resulted in this output with PHP 8.4.21 :
PHP Version
PHP 8.2.31 (cli) (built: May 8 2026 07:20:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.31, Copyright (c) Zend Technologies
with Zend OPcache v8.2.31, Copyright (c), by Zend Technologies
PHP 8.4.21 (cli) (built: May 8 2026 05:56:48) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.21, Copyright (c) Zend Technologies
with Zend OPcache v8.4.21, Copyright (c), by Zend Technologies
Operating System
PHP 8.2.31 : Debian 12.14 - PHP 8.4.21 : Debian 13.5
Description
The following code:
Resulted in this output with PHP 8.2.31 :
Resulted in this output with PHP 8.4.21 :
PHP Version
Operating System
PHP 8.2.31 : Debian 12.14 - PHP 8.4.21 : Debian 13.5