php-src/Zend/tests/bug81631.phpt
Nikita Popov 4d4fe7639f Fixed bug #81631
We need to save the opline before fetching the operand, as it may
throw an undef var warning.
2021-11-17 16:06:25 +01:00

15 lines
320 B
PHP

--TEST--
Bug #81631: ::class with dynamic class name may yield wrong line number
--FILE--
<?php
$a = 0;
var_dump($b::class);
?>
--EXPECTF--
Warning: Undefined variable $b in %s on line 3
Fatal error: Uncaught TypeError: Cannot use "::class" on value of type null in %s:3
Stack trace:
#0 {main}
thrown in %s on line 3