php-src/Zend/tests/class_on_constant_evaluated_expression.phpt

11 lines
196 B
PHP

--TEST--
An error should be generated when using ::class on a constant evaluated expression
--FILE--
<?php
(1+1)::class;
?>
--EXPECTF--
Fatal error: Cannot use "::class" on int in %s on line %d