3v4l.org

run code in 300+ PHP versions simultaneously
<?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)
8.3.60.0100.01018.77
8.3.50.0100.01021.09
8.3.40.0070.01118.72
8.3.30.0030.01020.34
8.3.20.0040.00420.61
8.3.10.0080.00020.95
8.3.00.0040.00423.53
8.2.180.0190.00317.00
8.2.170.0150.00022.96
8.2.160.0070.01020.40
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.00619.79
8.2.110.0060.00320.35
8.2.100.0090.00317.59
8.2.90.0050.00320.52
8.2.80.0030.00619.29
8.2.70.0030.00517.63
8.2.60.0000.00817.93
8.2.50.0030.00518.07
8.2.40.0080.00018.22
8.2.30.0000.00719.34
8.2.20.0090.00017.90
8.2.10.0000.00717.83
8.2.00.0040.00417.87
8.1.280.0130.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00420.96
8.1.230.0090.00322.75
8.1.220.0090.00017.74
8.1.210.0000.01018.88
8.1.200.0030.00617.35
8.1.190.0050.00317.55
8.1.180.0000.00818.10
8.1.170.0080.00018.64
8.1.160.0000.00818.81
8.1.150.0000.00718.70
8.1.140.0030.00517.34
8.1.130.0000.01017.75
8.1.120.0000.00717.39
8.1.110.0050.00217.50
8.1.100.0040.00417.37
8.1.90.0050.00317.38
8.1.80.0050.00217.46
8.1.70.0030.00517.45
8.1.60.0060.00317.49
8.1.50.0030.00517.50
8.1.40.0000.00817.52
8.1.30.0000.00717.61
8.1.20.0040.00417.68
8.1.10.0000.00717.50
8.1.00.0040.00417.56
8.0.300.0050.00219.98
8.0.290.0000.00717.04
8.0.280.0070.00018.45
8.0.270.0000.00718.20
8.0.260.0060.00016.81
8.0.250.0030.00517.07
8.0.240.0070.00017.09
8.0.230.0040.00416.93
8.0.220.0030.00317.04
8.0.210.0000.00816.87
8.0.200.0030.00317.05
8.0.190.0000.00717.01
8.0.180.0040.00416.88
8.0.170.0000.00817.01
8.0.160.0000.00716.89
8.0.150.0040.00416.96
8.0.140.0030.00516.82
8.0.130.0030.00313.44
8.0.120.0040.00416.98
8.0.110.0050.00216.74
8.0.100.0080.00016.93
8.0.90.0000.00717.04
8.0.80.0090.00617.02
8.0.70.0000.00816.93
8.0.60.0040.00416.99
8.0.50.0050.00216.87
8.0.30.0060.01217.27
8.0.20.0110.01217.40
8.0.10.0070.00016.95
8.0.00.0080.01616.76
7.4.330.0050.00014.92
7.4.320.0030.00316.55
7.4.300.0030.00316.45
7.4.290.0000.00716.63
7.4.280.0090.00016.56
7.4.270.0000.00716.58
7.4.260.0070.00016.46
7.4.250.0050.00316.56
7.4.240.0070.00016.67
7.4.230.0080.00016.62
7.4.220.0160.00316.70
7.4.210.0070.01016.50
7.4.200.0070.00016.71
7.4.190.0050.00316.65
7.4.160.0090.00616.53
7.4.150.0090.00817.40
7.4.140.0080.01017.86
7.4.130.0080.01416.62
7.4.120.0100.01016.63
7.4.110.0070.01016.66
7.4.100.0090.00916.72
7.4.90.0110.00816.72
7.4.80.0090.00919.39
7.4.70.0070.01316.65
7.4.60.0120.00616.66
7.4.50.0030.00616.55
7.4.40.0080.00822.77
7.4.30.0000.01616.53
7.4.00.0040.01415.21
7.3.330.0030.00313.41
7.3.320.0030.00313.36
7.3.310.0000.00816.24
7.3.300.0000.00716.38
7.3.290.0060.00916.41
7.3.280.0060.01116.36
7.3.270.0310.01817.40
7.3.260.0130.01018.24
7.3.250.0040.01416.33
7.3.240.0090.00916.42
7.3.230.0060.01216.57
7.3.210.0110.00616.39
7.3.200.0170.00716.59
7.3.190.0090.00816.39
7.3.180.0070.01016.39
7.3.170.0090.00616.37
7.3.160.0030.01516.49
7.3.120.0090.00614.80
7.2.330.0080.01216.79
7.2.320.0130.01016.81
7.2.310.0140.00416.77
7.2.300.0060.00916.56
7.2.290.0120.00916.56
7.2.60.0030.00616.95
7.1.200.0040.00715.62
7.1.70.0080.00317.12
7.1.60.0110.01419.17
7.1.50.0070.01016.79
7.1.00.0000.05022.48
7.0.200.0000.01116.91
7.0.140.0070.07022.10
7.0.70.0000.06321.74
7.0.60.0070.07721.69
7.0.50.0070.08022.11
7.0.40.0030.09020.05
7.0.30.0030.04320.03
7.0.20.0070.08320.18
7.0.10.0070.06020.10
7.0.00.0130.03320.12
5.6.280.0100.06321.00
5.6.220.0030.08020.68
5.6.210.0030.08320.61
5.6.200.0030.09321.10
5.6.190.0100.07321.02
5.6.180.0000.05021.03
5.6.170.0070.04720.96
5.6.160.0030.05321.05
5.6.150.0000.08320.96
5.6.140.0170.06021.13
5.6.130.0000.09321.01
5.6.120.0100.06021.18
5.6.110.0070.05021.01
5.6.100.0130.08020.92
5.6.90.0070.08321.04
5.6.80.0070.06320.39
5.6.70.0030.08720.47
5.6.60.0000.08720.49
5.6.50.0070.06020.51
5.6.40.0000.04020.40
5.6.30.0000.05720.42
5.6.20.0100.07020.31
5.6.10.0100.06020.45
5.6.00.0070.06320.30
5.5.360.0100.08020.43
5.5.350.0030.08320.34
5.5.340.0100.03320.77
5.5.330.0070.08320.91
5.5.320.0070.08320.82
5.5.310.0000.08720.82
5.5.300.0070.05320.82
5.5.290.0030.08020.77
5.5.280.0070.06720.82
5.5.270.0100.07720.89
5.5.260.0100.07720.76
5.5.250.0130.07020.73
5.5.240.0070.07720.21
5.5.230.0030.04320.04
5.5.220.0000.04320.21
5.5.210.0070.03720.04
5.5.200.0030.03720.30
5.5.190.0000.07720.09
5.5.180.0000.08320.18
5.5.160.0000.04720.26
5.5.150.0030.04320.20
5.5.140.0030.08320.23
5.5.130.0030.08720.27
5.5.120.0030.05320.26
5.5.110.0170.03320.00
5.5.100.0130.07020.11
5.5.90.0030.04019.96
5.5.80.0030.08019.96
5.5.70.0070.05320.08
5.5.60.0130.06720.08
5.5.50.0030.05020.10
5.5.40.0100.07320.14
5.5.30.0030.04720.10
5.5.20.0030.07320.08
5.5.10.0070.07320.05
5.5.00.0030.04320.06
5.4.450.0000.07019.25
5.4.440.0070.06719.38
5.4.430.0000.08319.20
5.4.420.0030.05719.50
5.4.410.0070.04019.42
5.4.400.0000.07019.21
5.4.390.0070.06319.24
5.4.380.0030.07719.00
5.4.370.0030.07719.24
5.4.360.0070.03319.02
5.4.350.0000.03718.90
5.4.340.0000.07018.85
5.4.320.0030.08319.02
5.4.310.0000.07718.85
5.4.300.0000.05718.89
5.4.290.0100.02319.21
5.4.280.0030.04019.16
5.4.270.0030.05318.85
5.4.260.0070.04318.86
5.4.250.0030.06019.12
5.4.240.0000.05318.86
5.4.230.0000.08019.11
5.4.220.0070.07019.11
5.4.210.0030.06719.02
5.4.200.0030.04019.02
5.4.190.0070.03718.94
5.4.180.0070.03318.89
5.4.170.0100.03319.23
5.4.160.0030.07319.14
5.4.150.0070.07719.10
5.4.140.0100.06716.33
5.4.130.0030.07316.41
5.4.120.0000.07316.42
5.4.110.0030.07716.34
5.4.100.0030.06716.50
5.4.90.0000.05716.47
5.4.80.0070.07016.34
5.4.70.0070.05316.47
5.4.60.0030.06316.40
5.4.50.0070.05716.40
5.4.40.0000.04716.36
5.4.30.0000.07716.44
5.4.20.0030.07016.47
5.4.10.0000.07716.33
5.4.00.0070.03715.88
5.3.290.0030.08014.75
5.3.280.0000.04314.62
5.3.270.0000.04314.55
5.3.260.0000.08314.77
5.3.250.0000.06714.64
5.3.240.0000.07014.76
5.3.230.0070.06314.61
5.3.220.0000.06714.66
5.3.210.0000.04314.68
5.3.200.0030.04014.64
5.3.190.0000.03714.71
5.3.180.0000.06714.62
5.3.170.0000.07714.64
5.3.160.0000.03714.52
5.3.150.0000.08014.59
5.3.140.0030.07314.53
5.3.130.0100.03014.59
5.3.120.0000.07714.53
5.3.110.0030.04014.64
5.3.100.0000.04013.98
5.3.90.0100.07314.07
5.3.80.0000.05313.95
5.3.70.0000.06314.04
5.3.60.0030.03014.05
5.3.50.0000.04013.94
5.3.40.0070.06713.96
5.3.30.0100.05713.93
5.3.20.0000.07313.69
5.3.10.0000.07313.58
5.3.00.0000.07313.76
5.2.170.0070.06712.18
5.2.160.0070.04712.18
5.2.150.0030.04012.18
5.2.140.0000.03712.18
5.2.130.0000.06712.18
5.2.120.0030.06312.18
5.2.110.0070.06312.18
5.2.100.0000.03312.18
5.2.90.0000.06312.18
5.2.80.0070.05312.18
5.2.70.0000.07012.18
5.2.60.0030.06312.18
5.2.50.0000.03312.18
5.2.40.0030.05312.18
5.2.30.0130.05312.18
5.2.20.0030.06012.18
5.2.10.0070.05712.18
5.2.00.0130.04712.18
5.1.60.0070.04712.18
5.1.50.0030.04712.18
5.1.40.0000.05712.18
5.1.30.0030.05712.18
5.1.20.0100.05012.18
5.1.10.0070.04712.18
5.1.00.0070.03712.18
5.0.50.0070.03012.18
5.0.40.0030.04312.18
5.0.30.0000.05712.18
5.0.20.0030.03712.18
5.0.10.0000.02312.18
5.0.00.0070.05312.18
4.4.90.0070.03012.18
4.4.80.0030.01312.18
4.4.70.0030.03312.18
4.4.60.0030.02012.18
4.4.50.0030.03012.18
4.4.40.0030.05012.18
4.4.30.0030.02312.18
4.4.20.0030.03312.18
4.4.10.0000.03712.18
4.4.00.0030.03012.18
4.3.110.0000.04012.18
4.3.100.0000.01712.18
4.3.90.0030.03712.18
4.3.80.0030.05012.18
4.3.70.0030.03012.18
4.3.60.0000.03312.18
4.3.50.0030.03312.18
4.3.40.0070.05012.18
4.3.30.0030.02312.18
4.3.20.0000.03012.18
4.3.10.0000.03012.18
4.3.00.0000.03712.18

preferences:
49.81 ms | 401 KiB | 5 Q