php-src/Zend/tests/class_name_as_scalar_error_005.phpt
Nikita Popov 16a9bc1ec2 Disallow self etc outside classes at compile-time
Also fix a bug with return types where "self" was rejected inside
a class, but not on a method.

Fallout: A couple of tests changed to more generic error messages.
2015-04-29 20:51:08 +02:00

11 lines
219 B
PHP

--TEST--
class name as scalar from ::class keyword error using static non class context
--FILE--
<?php
$x = static::class;
?>
--EXPECTF--
Fatal error: Cannot use "static" when no class scope is active in %s on line 3