mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

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.
10 lines
201 B
PHP
10 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
|