1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/closures/closure_static_property_error.phpt
Alexandre Daubois e43074a1d8 Rename poorly named tests in Zend/tests (#19332)
And move some into their relevant folders
2025-07-31 19:58:01 +01:00

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