php-src/Zend/tests/class_name_as_scalar_error_007.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
197 B
PHP

--TEST--
Cannot access self::class when no class scope is active
--FILE--
<?php
var_dump(self::class);
?>
--EXPECTF--
Fatal error: Cannot use "self" when no class scope is active in %s on line 3