mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
d30cd7d7e7
Closes GH-5590
21 lines
352 B
PHP
21 lines
352 B
PHP
--TEST--
|
|
Cannot access self::class when no class scope is active
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
var_dump(self::class);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
try {
|
|
var_dump([self::class]);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Cannot use "self" in the global scope
|
|
Cannot use "self" in the global scope
|