dis-bench / src /php /php-src /Zend /tests /constexpr /gh10014.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
326 Bytes
--TEST--
GH-10014: Incorrect short-circuiting in constant expressions
--FILE--
<?php
#[Attribute(+[[][2]?->y]->y)]
class y {
}
(new ReflectionClass(y::class))->getAttributes()[0]->newInstance();
?>
--EXPECTF--
Warning: Undefined array key 2 in %s on line %d
Warning: Attempt to read property "y" on array in %s on line %d