3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php class test implements Serializable { public $a; public function __construct( $_val ){ $this->a = $_val; } public function serialize() { $tmp = (object) array(); $tmp->a = $this->a; echo serialize( $tmp ) . "\n"; return serialize( $tmp ); } public function unserialize($var) {} } $n = array(); $n[] = new test("temp1"); $n[] = new test("temp2"); $n[] = new test("temp3"); $n[] = new test("temp4"); $n[] = new test("temp5"); $n[] = new test("temp6"); $n[] = new test("temp7"); $n[] = new test("temp8"); $n[] = new test("temp9"); print_r( unserialize( serialize( $n ) ) ); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.210.0100.03912.37
5.4.200.0110.04012.37
5.4.190.0100.04112.36
5.4.180.0110.03912.36
5.4.170.0080.04412.37
5.4.160.0090.04712.37
5.4.150.0130.03712.36
5.4.140.0170.05512.06
5.4.130.0100.04312.04
5.4.120.0090.03912.00
5.4.110.0180.05012.00
5.4.100.0100.03812.00
5.4.90.0100.03712.00
5.4.80.0080.04012.00
5.4.70.0080.04012.00
5.4.60.0080.04512.00
5.4.50.0100.03712.00
5.4.40.0110.03711.98
5.4.30.0120.04711.98
5.4.20.0110.03911.97
5.4.10.0080.04011.98
5.4.00.0100.04211.47
5.3.270.0090.04212.72
5.3.260.0110.04712.72
5.3.250.0100.04112.72
5.3.240.0110.04212.72
5.3.230.0100.04312.71
5.3.220.0090.04312.68
5.3.210.0120.04012.68
5.3.200.0130.04912.68
5.3.190.0090.04212.68
5.3.180.0100.04112.67
5.3.170.0110.03912.67
5.3.160.0090.04112.68
5.3.150.0090.04112.67
5.3.140.0110.04312.66
5.3.130.0120.04312.66
5.3.120.0110.04812.66
5.3.110.0140.04812.66
5.3.100.0140.04712.12
5.3.90.0080.04812.08
5.3.80.0110.04912.08
5.3.70.0120.05012.08
5.3.60.0120.04912.06
5.3.50.0090.04512.00
5.3.40.0140.04512.00
5.3.30.0090.04111.94
5.3.20.0120.04411.71
5.3.10.0130.05711.68
5.3.00.0120.05311.66

preferences:
139.94 ms | 1394 KiB | 7 Q