mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
6ef8ae65a2
This fixes a regression from 16a9bc1ec2
.
Together with the recent closure related changes this should allow
all usages of self etc, while previously (in PHP 5) some things like
self::class did not work.
11 lines
201 B
PHP
11 lines
201 B
PHP
--TEST--
|
|
Accessing self::FOO in a free function
|
|
--FILE--
|
|
<?php
|
|
function test() {
|
|
var_dump(self::FOO);
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use "self" when no class scope is active in %s on line %d
|