3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example implements Serializable { /* Serializable */ public function serialize() { // We need to serialize everything because a run-time object of this class hasn't a reference return serialize(array( 'label' => 'a label', 'links' => 'some links', 'attrs' => 'some attrs', )); } public function unserialize($s) { return 'pie'; } } $o = new Example; $o->self = $o; echo serialize($o);
Output for git.master_jit, git.master, rfc.property-hooks
Deprecated: Example 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/PV0m7 on line 3 Deprecated: Creation of dynamic property Example::$self is deprecated in /in/PV0m7 on line 22 C:7:"Example":92:{a:3:{s:5:"label";s:7:"a label";s:5:"links";s:10:"some links";s:5:"attrs";s:10:"some attrs";}}

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:
42.11 ms | 402 KiB | 8 Q