mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
9364153942
It's somewhat ambiguous what exactly the correct behavior is supposed to be, I'm just picking something more or less reasonable here.
23 lines
275 B
PHP
23 lines
275 B
PHP
--TEST--
|
|
Bug #76430: __METHOD__ inconsistent outside of method
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
const X = __METHOD__;
|
|
}
|
|
function foo() {
|
|
class Bar {
|
|
const X = __METHOD__;
|
|
}
|
|
}
|
|
|
|
foo();
|
|
var_dump(Foo::X);
|
|
var_dump(Bar::X);
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(0) ""
|
|
string(0) ""
|