1--TEST-- 2possible segfault in `ZEND_BIND_STATIC` 3--DESCRIPTION-- 4https://github.com/php/php-src/pull/12758 5--EXTENSIONS-- 6zend_test 7--ENV-- 8USE_ZEND_ALLOC=1 9--INI-- 10zend_test.observe_opline_in_zendmm=1 11--FILE-- 12<?php 13 14function &ref() { 15 static $a = 5; 16 return $a; 17} 18 19class Foo { 20 public static int $i; 21 public static string $s = "x"; 22} 23 24var_dump(Foo::$i = "1"); 25var_dump(Foo::$s, Foo::$i); 26var_dump(ref()); 27 28echo 'Done.'; 29?> 30--EXPECT-- 31int(1) 32string(1) "x" 33int(1) 34int(5) 35Done. 36