3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements Serializable{ protected $_a = 'Aze'; function serialize(){ return serialize(array('a' => $this->_a)); } function unserialize($s){ $d = unserialize($s); $_a = $d['a']; } } $a = new A(); $s = serialize($a); var_dump($s); $b = unserialize($b); var_dump($b);
Output for git.master, git.master_jit, rfc.property-hooks
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/laML3 on line 3 string(37) "C:1:"A":24:{a:1:{s:1:"a";s:3:"Aze";}}" Warning: Undefined variable $b in /in/laML3 on line 20 Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /in/laML3 on line 20 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:
36.85 ms | 402 KiB | 8 Q