3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A implements Serializable { function __construct($o) { $this->o =& $o; } function serialize() { return serialize([&$this->o]); } function unserialize($s) { $this->o =& unserialize($s)[0]; } } $o = [new stdClass]; $r = unserialize(serialize([new A($o), new A($o)])); var_dump($r[0]->o[0] === $r[1]->o[0]);
Output for rfc.property-hooks, git.master, git.master_jit
Deprecated: A 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/HBuSg on line 2 Deprecated: Creation of dynamic property A::$o is deprecated in /in/HBuSg on line 4 Deprecated: Creation of dynamic property A::$o is deprecated in /in/HBuSg on line 4 Deprecated: Creation of dynamic property A::$o is deprecated in /in/HBuSg on line 10 Deprecated: Creation of dynamic property A::$o is deprecated in /in/HBuSg on line 10 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:
55.25 ms | 2718 KiB | 4 Q