xref: /PHP-8.2/Zend/tests/037.phpt (revision d30cd7d7)
1--TEST--
2Trying to access inexistent static property of Closure
3--FILE--
4<?php
5
6namespace closure;
7
8class closure { static $x = 1;}
9
10$x = __NAMESPACE__;
11var_dump(closure::$x);
12
13var_dump($x::$x);
14
15?>
16--EXPECTF--
17int(1)
18
19Fatal error: Uncaught Error: Access to undeclared static property Closure::$x in %s:%d
20Stack trace:
21#0 {main}
22  thrown in %s on line %d
23