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( $x = serialize( $n ) ) ); var_dump($x, serialize($n) === $x); ?>

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.40.0150.00018.82
8.3.30.0130.00320.20
8.3.20.0090.00320.28
8.3.10.0050.00321.08
8.3.00.0080.00023.52
8.2.170.0090.00622.96
8.2.160.0100.00720.39
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00020.89
8.2.110.0100.00020.57
8.2.100.0120.00017.84
8.2.90.0000.00819.26
8.2.80.0000.00819.32
8.2.70.0000.00917.72
8.2.60.0000.00918.03
8.2.50.0030.00618.07
8.2.40.0050.00518.28
8.2.30.0040.00419.52
8.2.20.0070.00017.76
8.2.10.0040.00417.84
8.2.00.0040.00417.84
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00422.59
8.1.230.0040.00720.96
8.1.220.0040.00418.77
8.1.210.0030.00618.90
8.1.200.0050.00517.47
8.1.190.0000.00717.40
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0000.00718.92
8.1.150.0040.00418.69
8.1.140.0070.00017.48
8.1.130.0000.01017.78
8.1.120.0000.00717.54
8.1.110.0040.00417.55
8.1.100.0000.00717.49
8.1.90.0000.00717.48
8.1.80.0080.00017.54
8.1.70.0030.00317.41
8.1.60.0030.00617.51
8.1.50.0000.00817.47
8.1.40.0000.00817.54
8.1.30.0000.00817.71
8.1.20.0000.00817.69
8.1.10.0000.00817.52
8.1.00.0040.00417.55
8.0.300.0050.00320.09
8.0.290.0050.00317.18
8.0.280.0000.00718.48
8.0.270.0040.00417.29
8.0.260.0000.00716.93
8.0.250.0000.00717.04
8.0.240.0070.00016.92
8.0.230.0070.00016.96
8.0.220.0030.00317.00
8.0.210.0070.00016.99
8.0.200.0000.00717.01
8.0.190.0070.00017.00
8.0.180.0000.00717.02
8.0.170.0040.00416.98
8.0.160.0000.00716.96
8.0.150.0000.00916.84
8.0.140.0030.00516.94
8.0.130.0060.00013.50
8.0.120.0000.00716.95
8.0.110.0040.00416.89
8.0.100.0080.00016.85
8.0.90.0070.00016.81
8.0.80.0030.01717.01
8.0.70.0070.00016.88
8.0.60.0000.00716.84
8.0.50.0040.00416.84
8.0.30.0090.01117.22
8.0.20.0100.00817.40
8.0.10.0040.00416.98
8.0.00.0060.01417.07
7.4.330.0030.00314.91
7.4.320.0030.00316.58
7.4.300.0000.00616.61
7.4.290.0000.00716.45
7.4.280.0090.00316.51
7.4.270.0000.00716.55
7.4.260.0000.00613.23
7.4.250.0030.00516.62
7.4.240.0070.00016.59
7.4.230.0030.00516.69
7.4.220.0090.00916.67
7.4.210.0100.00516.62
7.4.200.0000.00716.60
7.4.190.0000.00716.72
7.4.160.0030.01416.75
7.4.150.0070.01117.40
7.4.140.0110.00617.86
7.4.130.0110.00616.58
7.4.120.0080.01216.56
7.4.110.0090.00916.70
7.4.100.0070.01116.56
7.4.90.0090.00916.62
7.4.80.0110.01019.39
7.4.70.0100.01116.66
7.4.60.0130.00616.52
7.4.50.0040.00416.42
7.4.40.0030.01022.77
7.4.30.0030.01316.33
7.4.00.0100.00814.91
7.3.330.0060.00013.26
7.3.320.0060.00013.27
7.3.310.0040.00416.35
7.3.300.0000.00716.46
7.3.290.0130.00316.40
7.3.280.0070.01116.41
7.3.270.0130.01317.40
7.3.260.0110.01118.24
7.3.250.0110.00716.64
7.3.240.0100.00716.52
7.3.230.0110.00716.69
7.3.210.0110.00616.46
7.3.200.0140.00719.39
7.3.190.0070.01116.53
7.3.180.0090.00916.38
7.3.170.0030.01416.64
7.3.160.0060.00916.48
7.3.120.0080.01014.96
7.3.110.0090.00815.00
7.3.100.0040.01114.81
7.3.90.0120.00214.72
7.3.80.0070.00715.04
7.3.70.0050.00714.82
7.3.60.0080.00714.95
7.3.50.0020.01114.87
7.3.40.0060.00814.71
7.3.30.0090.00615.00
7.3.20.0080.00516.63
7.3.10.0050.00916.71
7.3.00.0030.01016.61
7.2.330.0140.00416.81
7.2.320.0130.01016.75
7.2.310.0140.01016.73
7.2.300.0060.00916.83
7.2.290.0060.01316.59
7.2.250.0120.00915.29
7.2.240.0050.01415.11
7.2.230.0050.01214.97
7.2.220.0070.00715.02
7.2.210.0030.01214.98
7.2.200.0040.00815.13
7.2.190.0050.00714.91
7.2.180.0050.00914.95
7.2.170.0030.01015.18
7.2.160.0000.01515.18
7.2.150.0060.00616.87
7.2.140.0030.01117.11
7.2.130.0130.00316.98
7.2.120.0100.00317.00
7.2.110.0060.00916.64
7.2.100.0060.00616.92
7.2.90.0090.00616.98
7.2.80.0100.00316.86
7.2.70.0030.01316.71
7.2.60.0080.00516.95
7.2.50.0040.00817.00
7.2.40.0030.01316.84
7.2.30.0000.01116.98
7.2.20.0090.00616.79
7.2.10.0110.00017.03
7.2.00.0030.01017.86
7.1.330.0070.00715.88
7.1.320.0050.00815.78
7.1.310.0080.00515.93
7.1.300.0070.00615.84
7.1.290.0040.00915.72
7.1.280.0040.01115.77
7.1.270.0030.00915.73
7.1.260.0050.01015.78
7.1.250.0100.00315.75
7.1.200.0060.00615.81
7.1.100.0130.00317.90
7.1.70.0000.00717.33
7.1.60.0110.01119.17
7.1.50.0070.00417.05
7.1.00.0070.06322.36
7.0.200.0430.01214.76
7.0.140.0030.07022.00
7.0.100.0070.08319.90
7.0.90.0070.07019.87
7.0.80.0100.08019.89
7.0.70.0130.07319.86
7.0.60.0100.04319.87
7.0.50.0030.05320.34
7.0.40.0030.07320.06
7.0.30.0070.05020.00
7.0.20.0030.06720.15
7.0.10.0100.08320.08
7.0.00.0100.07320.10
5.6.280.0030.07720.90
5.6.250.0000.07320.75
5.6.240.0100.04320.52
5.6.230.0070.06720.66
5.6.220.0130.07720.54
5.6.210.0130.05720.64
5.6.200.0070.08720.98
5.6.190.0070.08721.06
5.6.180.0200.06020.96
5.6.170.0070.06721.11
5.6.160.0070.08021.04
5.6.150.0200.07321.04
5.6.140.0130.07721.08
5.6.130.0100.08021.09
5.6.120.0100.07721.04
5.6.110.0100.07020.95
5.6.100.0070.04321.08
5.6.90.0100.07720.93
5.6.80.0130.07320.39
5.6.70.0100.07320.47
5.6.60.0030.08320.39
5.6.50.0130.06720.48
5.6.40.0070.08020.53
5.6.30.0130.04020.49
5.6.20.0100.07720.41
5.6.10.0070.06020.44
5.6.00.0100.04720.40
5.5.380.0100.04320.49
5.5.370.0100.06720.36
5.5.360.0000.07720.51
5.5.350.0100.07720.44
5.5.340.0030.08320.82
5.5.330.0100.08320.75
5.5.320.0100.04320.88
5.5.310.0070.04320.85
5.5.300.0070.05720.90
5.5.290.0100.08720.86
5.5.280.0000.08720.80
5.5.270.0070.08020.79
5.5.260.0030.09320.77
5.5.250.0100.08720.62
5.5.240.0130.07020.32
5.5.230.0000.08320.32
5.5.220.0030.08320.29
5.5.210.0070.06720.19
5.5.200.0130.06320.18
5.5.190.0130.06320.16
5.5.180.0070.07720.12
5.5.160.0170.07320.01
5.5.150.0170.07320.20
5.5.140.0070.07020.16
5.5.130.0070.04020.14
5.5.120.0030.04020.13
5.5.110.0100.03320.29
5.5.100.0070.03720.13
5.5.90.0030.03719.98
5.5.80.0070.04020.13
5.5.70.0070.03720.07
5.5.60.0000.04320.05
5.5.50.0030.04020.03
5.5.40.0070.03719.95
5.5.30.0100.04020.09
5.5.20.0030.04020.03
5.5.10.0070.03720.02
5.5.00.0070.04020.10
5.4.450.0070.06319.36
5.4.440.0100.05019.25
5.4.430.0070.07719.45
5.4.420.0100.07319.48
5.4.410.0070.07719.10
5.4.400.0100.06719.06
5.4.390.0100.07319.04
5.4.380.0070.07019.03
5.4.370.0130.05319.10
5.4.360.0100.04719.23
5.4.350.0170.06718.90
5.4.340.0130.06018.92
5.4.320.0030.04319.20
5.4.310.0130.07019.05
5.4.300.0000.04718.95
5.4.290.0100.04018.88
5.4.280.0000.04319.04
5.4.270.0370.02318.87
5.4.260.0000.04018.90
5.4.250.0000.04019.09
5.4.240.0100.02319.19
5.4.230.0030.04019.23
5.4.220.0000.04019.13
5.4.210.0070.03719.12
5.4.200.0070.03718.84
5.4.190.0000.04019.17
5.4.180.0130.03319.12
5.4.170.0130.03019.02
5.4.160.0070.04019.16
5.4.150.0100.03318.93
5.4.140.0000.05016.48
5.4.130.0130.02716.41
5.4.120.0030.03716.49
5.4.110.0030.04016.34
5.4.100.0100.03016.36
5.4.90.0030.03716.36
5.4.80.0000.03716.38
5.4.70.0030.03716.46
5.4.60.0070.03316.37
5.4.50.0030.03716.45
5.4.40.0030.05316.43
5.4.30.0000.04016.48
5.4.20.0030.03716.44
5.4.10.0030.04316.33
5.4.00.0070.03315.86
5.3.290.0070.08014.82
5.3.280.0070.03314.68
5.3.270.0030.04014.61
5.3.260.0000.04314.57
5.3.250.0070.03714.77
5.3.240.0030.06714.75
5.3.230.0000.04014.52
5.3.220.0000.04014.53
5.3.210.0000.04014.66
5.3.200.0070.03314.58
5.3.190.0070.03714.54
5.3.180.0030.03714.57
5.3.170.0030.05014.61
5.3.160.0030.03714.52
5.3.150.0000.03714.58
5.3.140.0070.03314.67
5.3.130.0030.03714.70
5.3.120.0070.03314.70
5.3.110.0030.04014.68
5.3.100.0000.04014.13
5.3.90.0030.04713.98
5.3.80.0030.04714.10
5.3.70.0000.05314.13
5.3.60.0000.04014.06
5.3.50.0070.04013.90
5.3.40.0030.06314.00
5.3.30.0000.08013.86
5.3.20.0170.05713.74
5.3.10.0100.07013.80
5.3.00.0070.03313.68
5.2.170.0030.02711.18
5.2.160.0030.05311.05
5.2.150.0030.05011.08
5.2.140.0000.05311.05
5.2.130.0000.04011.26
5.2.120.0070.02311.26
5.2.110.0000.03011.25
5.2.100.0030.05711.21
5.2.90.0070.06711.05
5.2.80.0130.06011.15
5.2.70.0070.05711.13
5.2.60.0130.05311.20
5.2.50.0030.04711.05
5.2.40.0070.04311.05
5.2.30.0000.06711.11
5.2.20.0000.04711.05
5.2.10.0100.05311.05
5.2.00.0000.05011.05
5.1.60.0070.04011.05
5.1.50.0070.05311.05
5.1.40.0070.04711.05
5.1.30.0030.05311.05
5.1.20.0030.05011.05
5.1.10.0100.05011.05
5.1.00.0130.04711.05
5.0.50.0030.04311.05
5.0.40.0030.04011.05
5.0.30.0070.06011.05
5.0.20.0170.03011.05
5.0.10.0100.03011.05
5.0.00.0000.05311.05
4.4.90.0070.02011.05
4.4.80.0000.03311.05
4.4.70.0030.03311.05
4.4.60.0000.01711.05
4.4.50.0000.03311.05
4.4.40.0000.03311.05
4.4.30.0000.03711.05
4.4.20.0000.02711.05
4.4.10.0030.03311.05
4.4.00.0000.05011.05
4.3.110.0000.02311.05
4.3.100.0070.03011.05
4.3.90.0000.03711.05
4.3.80.0000.05011.05
4.3.70.0000.03311.05
4.3.60.0030.02311.05
4.3.50.0000.03711.05
4.3.40.0000.05311.05
4.3.30.0030.03311.05
4.3.20.0000.02011.05
4.3.10.0070.03011.05
4.3.00.0000.03011.05

preferences:
42.57 ms | 400 KiB | 5 Q