mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
d30cd7d7e7
Closes GH-5590
23 lines
355 B
PHP
23 lines
355 B
PHP
--TEST--
|
|
Trying to access inexistent static property of Closure
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace closure;
|
|
|
|
class closure { static $x = 1;}
|
|
|
|
$x = __NAMESPACE__;
|
|
var_dump(closure::$x);
|
|
|
|
var_dump($x::$x);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
int(1)
|
|
|
|
Fatal error: Uncaught Error: Access to undeclared static property Closure::$x in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|