3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements \Serializable { public function serialize() { $dt = new \DateTime(); return serialize(array($dt, serialize([$dt]))); } public function unserialize($serialized) { $a = unserialize($serialized); unserialize($a[1]); } } $a = new A(); $s = serialize($a); echo $s; $d = unserialize($s);
Output for git.master
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/4R098 on line 3 C:1:"A":165:{a:2:{i:0;r:3;i:1;s:138:"a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-12-10 15:30:55.003935";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}";}} Notice: unserialize(): Error at offset 13 of 165 bytes in /in/4R098 on line 13 Warning: Trying to access array offset on value of type bool in /in/4R098 on line 14 Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /in/4R098 on line 14
Output for 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/4R098 on line 3 C:1:"A":165:{a:2:{i:0;r:3;i:1;s:138:"a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-12-10 15:30:55.004519";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}";}} Notice: unserialize(): Error at offset 13 of 165 bytes in /in/4R098 on line 13 Warning: Trying to access array offset on value of type bool in /in/4R098 on line 14 Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /in/4R098 on line 14
Output for 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/4R098 on line 3 C:1:"A":165:{a:2:{i:0;r:3;i:1;s:138:"a:1:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2015-12-10 15:30:55.003777";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}}";}} Warning: unserialize(): Error at offset 13 of 165 bytes in /in/4R098 on line 13 Warning: Trying to access array offset on false in /in/4R098 on line 14 Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /in/4R098 on line 14

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