mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
c19977d054
It's possible for delayed early binding opcodes to get optimized away if they are "unreachable". However, we still need to attempt early binding for them. (In some cases we also corrupt the early binding list outright during optimization, which is how I got here.) Fix this by storing information about delayed early binding independently of DECLARE_CLASS_DELAYED opcodes, so early binding is performed even after the opcode has been dropped.
11 lines
169 B
PHP
11 lines
169 B
PHP
--TEST--
|
|
Early bound class in otherwise unreachable code
|
|
--FILE--
|
|
<?php
|
|
class A {}
|
|
require __DIR__ . '/early_binding_unreachable.inc';
|
|
?>
|
|
--EXPECT--
|
|
object(B)#1 (0) {
|
|
}
|