[php-src] Issue #23243: Strange behaviour when using include and dot operator

From: Date: Thu, 13 Aug 2026 09:30:35 +0000
Subject: [php-src] Issue #23243: Strange behaviour when using include and dot operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-252597@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/23243 Author: bug-fix0r ### Description Bug also exists in 8.5.9. It thinks "jo" is part of the include path. For those who don't know include() returns the value returned in the include file. The following code: ```php <?php error_reporting(E_ALL); echo include("does-not-exist97456.php")."jo"; ``` Resulted in this output: ``` PHP Warning: include(does-not-exist97456.phpjo): Failed to open stream: No such file or directory in /home/user1/php_include_bug.php on line 3 PHP Warning: include(): Failed opening 'does-not-exist97456.phpjo' for inclusion (include_path='.:/usr/share/php') in /home/user1/php_include_bug.php on line 3 ``` But I expected this output instead: ``` PHP Warning: include(does-not-exist97456.php): Failed to open stream: No such file or directory in /home/user1/php_include_bug.php on line 3 PHP Warning: include(): Failed opening 'does-not-exist97456.php' for inclusion (include_path='.:/usr/share/php') in /home/user1/php_include_bug.php on line 3 jo ``` ### PHP Version ```plain PHP 8.4.24 (cli) (built: Jul 31 2026 05:11:11) (NTS) Copyright (c) The PHP Group Built by Debian Zend Engine v4.4.24, Copyright (c) Zend Technologies with Zend OPcache v8.4.24, Copyright (c), by Zend Technologies ``` ### Operating System _No response_

« previous php.bugs (#252597) next »