[php-src] Issue #19549: Inconsistent echo results of reflection class
| From: | YuanchengJiang | Date: | Fri, 22 Aug 2025 04:28:57 +0000 |
| Subject: | [php-src] Issue #19549: Inconsistent echo results of reflection class | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-250597@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/19549
Author: YuanchengJiang
### Description
The following code:
```php
<?php
class C {
public stdClass $a = FOO;
}
$reflector = new ReflectionProperty(C::class, 'a');
define('FOO', new stdClass);
new C;
echo $reflector;
```
Resulted in this output without JIT:
```
Property [ public stdClass $a = object(stdClass) ]
```
Resulted in this output with JIT (
-d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.jit=tracing"):
```
Property [ public stdClass $a = FOO ]
```
### PHP Version
```plain
nightly
```
### Operating System
_No response_