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 === $r[1]->o);
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/t5YP8 on line 2 Deprecated: Creation of dynamic property A::$o is deprecated in /in/t5YP8 on line 4 Deprecated: Creation of dynamic property A::$o is deprecated in /in/t5YP8 on line 4 Deprecated: Creation of dynamic property A::$o is deprecated in /in/t5YP8 on line 10 Deprecated: Creation of dynamic property A::$o is deprecated in /in/t5YP8 on line 10 bool(true)

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:
46.88 ms | 2551 KiB | 4 Q