3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Widget implements Serializable { public $references = array(); public function serialize() { $vars = get_object_vars($this); $serialized = serialize($vars); return $serialized; } public function unserialize($serialized) { $array = unserialize($serialized); foreach($array as $k => $v) $this->$k = $v; } } class Placeholder { public $id; public function __construct($id) { $this->id = $id; } } unserialize('a:4:{i:0;C:6:"Widget":70:{a:1:{s:10:"references";a:1:{i:0;O:11:"Placeholder":1:{s:2:"id";i:1;}}}}i:1;C:6:"Widget":70:{a:1:{s:10:"references";a:1:{i:0;O:11:"Placeholder":1:{s:2:"id";i:2;}}}}i:2;C:6:"Widget":38:{a:1:{s:10:"references";a:1:{i:0;r:5;}}}i:3;C:6:"Widget":38:{a:1:{s:10:"references";a:1:{i:0;r:5;}}}}');
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Widget 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/5clCQ on line 2

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