3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld implements Serializable { public $test; public function __construct($str) { $this->test = $str; } public function serialize() { $simple = null; $simple = new Simple(); $simple->test = $this->test; return serialize($simple); } public function unserialize($str) { $simple = unserialize($str); $this->test = $simple->test; } } class Simple { public $test; } $list = array( new HelloWorld('str1'), new HelloWorld('str2'), new HelloWorld('str3'), new HelloWorld('str4'), new HelloWorld('str5'), new HelloWorld('str6'), new HelloWorld('str7'), new HelloWorld('str8'), new HelloWorld('str9'), ); $str = serialize($list); echo $str; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: HelloWorld 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/rX4nk on line 2 a:9:{i:0;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str1";}}i:1;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str2";}}i:2;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str3";}}i:3;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str4";}}i:4;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str5";}}i:5;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str6";}}i:6;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str7";}}i:7;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str8";}}i:8;C:10:"HelloWorld":39:{O:6:"Simple":1:{s:4:"test";s:4:"str9";}}}

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:
45.96 ms | 403 KiB | 8 Q