3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __wakeup() { print "[-] Wakeup method called!\n"; } function __destruct() { print "[-] Destruct method called!\n"; var_dump($this); } } $normal = 'O:3:"Foo":1:{s:1:"x";s:1:"y";}'; $broken = 'O:3:"Foo":2:{s:1:"x";s:1:"y";}'; unserialize($normal); unserialize($broken);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Foo::$x is deprecated in /in/QqeAD on line 20 [-] Wakeup method called! [-] Destruct method called! object(Foo)#1 (1) { ["x"]=> string(1) "y" } Deprecated: Creation of dynamic property Foo::$x is deprecated in /in/QqeAD on line 21 Warning: unserialize(): Unexpected end of serialized data in /in/QqeAD on line 21 Warning: unserialize(): Error at offset 29 of 30 bytes in /in/QqeAD on line 21

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
27.76 ms | 406 KiB | 5 Q