xref: /PHP-8.1/Zend/tests/bug79818.phpt (revision d30cd7d7)
1--TEST--
2Bug #79818: BIND_STATIC frees old variable value too early
3--FILE--
4<?php
5function test($a) {
6    static $a = UNDEFINED;
7}
8test(new stdClass);
9?>
10--EXPECTF--
11Fatal error: Uncaught Error: Undefined constant "UNDEFINED" in %s:%d
12Stack trace:
13#0 %s(%d): test(Object(stdClass))
14#1 {main}
15  thrown in %s on line %d
16