[php-src] Issue #13142: Undefined variable name is shortened when contains \0
| From: | jorgsowa | Date: | Sat, 13 Jan 2024 21:24:24 +0000 |
| Subject: | [php-src] Issue #13142: Undefined variable name is shortened when contains \0 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246257@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13142
Author: jorgsowa
### Description
The following code:
```php
<?php
$a = "test\0test";
$$a;
```
https://3v4l.org/vSKAO#v8.3.1
Resulted in this output:
```
Warning: Undefined variable $test in /in/vSKAO on line 5
```
But I expected this output instead:
```
Warning: Undefined variable $test\0test in /in/vSKAO on line 5
```
Or even:
```
Warning: Undefined variable $testtest in /in/vSKAO on line 5
```
### PHP Version
PHP 8.3.1
### Operating System
_No response_