php-src/Zend/tests/class_name_of_var.phpt
Nikita Popov 290adc4132 Introduce separate ZEND_AST_CLASS_NAME AST node
Instead of representing this as a ZEND_AST_CLASS_CONST with a
"class" constant name.

Class constants and ::class are unrelated features that happen to
share syntax, so represent and handle them separately.
2019-01-04 10:49:23 +01:00

12 lines
187 B
PHP

--TEST--
$var::class is not supported
--FILE--
<?php
$obj = new stdClass;
var_dump($obj::class);
?>
--EXPECTF--
Fatal error: Cannot use ::class with dynamic class name in %s on line %d