3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar {} class Foo implements Serializable { public $test; public function __construct($test) { $this->test = $test; } public function serialize() { return $this->test; } public function unserialize($serialized) { //the following line causes problems unserialize('O:3:"Bar":1:{s:4:"bar1";O:3:"Bar":0:{}}'); $this->test = $serialized; } } $foo1 = new Foo('foo1'); $foo2 = new Foo('foo2'); $foo3 = new Foo('foo3'); $ar = array( array( 'instance' => $foo1, ), array( 'instance' => $foo2, ), array( 'instance' => $foo3, 'parent' => $foo2 ) ); $ar = serialize($ar); $ar = unserialize($ar); print_r($ar);

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.0090.00618.68
8.3.30.0110.00418.82
8.3.20.0030.00518.73
8.3.10.0030.00620.48
8.3.00.0090.00019.38
8.2.170.0070.00722.96
8.2.160.0070.01120.68
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.07
8.2.110.0070.00421.08
8.2.100.0110.00017.97
8.2.90.0040.00519.22
8.2.80.0000.00719.41
8.2.70.0000.00817.63
8.2.60.0060.00318.00
8.2.50.0030.00618.07
8.2.40.0030.00618.22
8.2.30.0070.00318.22
8.2.20.0000.00819.50
8.2.10.0050.00217.71
8.2.00.0050.00517.69
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0070.00728.09
8.1.240.0130.01022.42
8.1.230.0070.00420.97
8.1.220.0040.00417.74
8.1.210.0040.00419.03
8.1.200.0000.01117.35
8.1.190.0000.00817.63
8.1.180.0080.00018.10
8.1.170.0000.00818.89
8.1.160.0040.00418.78
8.1.150.0040.00418.72
8.1.140.0030.00617.47
8.1.130.0070.00017.76
8.1.120.0030.00617.47
8.1.110.0070.00017.49
8.1.100.0070.00017.36
8.1.90.0000.00817.48
8.1.80.0040.00417.51
8.1.70.0050.00317.41
8.1.60.0000.00717.55
8.1.50.0000.00817.43
8.1.40.0050.00217.48
8.1.30.0080.00017.61
8.1.20.0050.00317.62
8.1.10.0040.00417.51
8.1.00.0050.00217.39
8.0.300.0000.00820.03
8.0.290.0000.00816.75
8.0.280.0000.00718.34
8.0.270.0030.00317.23
8.0.260.0070.00016.90
8.0.250.0070.00017.05
8.0.240.0000.00717.10
8.0.230.0030.00316.94
8.0.220.0000.00716.91
8.0.210.0030.00316.88
8.0.200.0070.00017.02
8.0.190.0040.00417.05
8.0.180.0000.00716.83
8.0.170.0040.00416.98
8.0.160.0030.00316.85
8.0.150.0090.00016.83
8.0.140.0040.00416.85
8.0.130.0070.00013.40
8.0.120.0030.00716.95
8.0.110.0050.00217.04
8.0.100.0080.00016.95
8.0.90.0000.00716.77
8.0.80.0060.01216.95
8.0.70.0000.00816.91
8.0.60.0000.00716.94
8.0.50.0040.00416.84
8.0.30.0090.00917.30
8.0.20.0100.01217.13
8.0.10.0000.00717.18
8.0.00.0090.01116.84
7.4.330.0020.00213.00
7.4.320.0030.00316.47
7.4.300.0030.00316.52
7.4.290.0030.00316.51
7.4.280.0000.00716.42
7.4.270.0030.00316.50
7.4.260.0030.00313.28
7.4.250.0040.00416.55
7.4.240.0020.00416.55
7.4.230.0000.00716.55
7.4.220.0070.01116.42
7.4.210.0070.01316.49
7.4.200.0070.00016.73
7.4.190.0030.00516.57
7.4.160.0030.01316.76
7.4.150.0220.00316.59
7.4.140.0080.00816.48
7.4.130.0100.00916.60
7.4.120.0140.00316.50
7.4.110.0080.00816.50
7.4.100.0090.01216.58
7.4.90.0100.00716.61
7.4.80.0000.01619.39
7.4.70.0100.00716.49
7.4.60.0070.00916.61
7.4.50.0000.00816.58
7.4.40.0040.01416.25
7.4.30.0060.01516.52
7.4.00.0090.00615.16
7.3.330.0030.00313.35
7.3.320.0030.00313.35
7.3.310.0000.00716.34
7.3.300.0000.00616.23
7.3.290.0080.00816.41
7.3.280.0100.00716.39
7.3.270.0160.00616.36
7.3.260.0070.01016.46
7.3.250.0090.00916.56
7.3.240.0030.01316.38
7.3.230.0100.01016.57
7.3.210.0130.00316.56
7.3.200.0060.01216.43
7.3.190.0070.01016.61
7.3.180.0070.01416.43
7.3.170.0130.00316.55
7.3.160.0070.01016.64
7.3.120.0090.00814.96
7.3.110.0070.00714.77
7.3.100.0110.00414.77
7.3.90.0090.00614.69
7.3.80.0110.00414.88
7.3.70.0090.00914.70
7.3.60.0070.00715.02
7.3.50.0030.01014.80
7.3.40.0070.01114.82
7.3.30.0000.01115.04
7.3.20.0150.00016.59
7.3.10.0070.00716.72
7.3.00.0060.00916.82
7.2.330.0100.00716.73
7.2.320.0000.01916.70
7.2.310.0200.00416.65
7.2.300.0080.00816.87
7.2.290.0210.00016.81
7.2.250.0130.00714.63
7.2.240.0110.00714.64
7.2.230.0040.01115.34
7.2.220.0060.00915.29
7.2.210.0060.00614.90
7.2.200.0030.01214.90
7.2.190.0100.00315.07
7.2.180.0120.00615.05
7.2.170.0100.00715.14
7.2.60.0140.01116.88
7.1.330.0040.01115.87
7.1.320.0040.00815.79
7.1.310.0000.01415.49
7.1.300.0080.00415.87
7.1.290.0090.00615.68
7.1.280.0060.00615.89
7.1.270.0060.00315.61
7.1.260.0090.00615.95
7.1.200.0000.01315.88
7.1.70.0030.00317.19
7.1.60.0100.01619.31
7.1.50.0130.00917.02
7.1.00.0030.04722.51
7.0.200.0100.00316.89
7.0.140.0030.07022.09
7.0.120.0000.08022.18
7.0.60.0070.03719.96
7.0.50.0130.07717.99
7.0.40.0000.04720.27
7.0.30.0200.05720.09
7.0.20.0300.07020.12
7.0.10.0100.08720.08
7.0.00.0070.04320.25
5.6.280.0070.07020.91
5.6.210.0030.08720.67
5.6.200.0030.04018.16
5.6.190.0000.04720.78
5.6.180.0200.05320.48
5.6.170.0230.04720.53
5.6.160.0070.08320.57
5.6.150.0100.07718.20
5.6.140.0030.04018.30
5.6.130.0170.07018.14
5.6.120.0070.06020.98
5.6.110.0030.09321.09
5.6.100.0170.05321.13
5.6.90.0170.08020.99
5.6.80.0100.07720.38
5.5.350.0270.08020.54
5.5.340.0030.04717.99
5.5.330.0070.08320.45
5.5.320.0230.05720.27
5.5.310.0330.07320.34
5.5.300.0100.05717.98
5.5.290.0100.03317.97
5.5.280.0130.06320.79
5.5.270.0070.07320.87
5.5.260.0030.06020.88
5.5.250.0030.04320.52
5.5.240.0000.06020.05
5.4.450.0170.07319.47
5.4.440.0070.06019.30
5.4.430.0030.04719.52
5.4.420.0030.04319.58
5.4.410.0100.07319.40
5.4.400.0130.04319.24
5.4.390.0030.06319.14
5.4.380.0130.05318.98
5.4.370.0100.04319.11
5.4.360.0070.04318.85
5.4.350.0100.04318.92
5.4.340.0070.06718.97
5.4.320.0000.04719.15
5.4.310.0130.07319.03
5.4.300.0070.06318.84
5.4.290.0200.06019.20
5.4.280.0100.07319.14
5.4.270.0130.06019.00
5.4.260.0130.03019.14
5.4.250.0030.05319.14
5.4.240.0200.05018.84
5.4.230.0200.05019.04
5.4.220.0130.07018.98
5.4.210.0100.07719.03
5.4.200.0130.07018.98
5.4.190.0030.04019.08
5.4.180.0070.07019.12
5.4.170.0070.07719.08
5.4.160.0100.06318.83
5.4.150.0070.07018.83
5.4.140.0070.07016.30
5.4.130.0100.04016.23
5.4.120.0100.05716.47
5.4.110.0070.04716.41
5.4.100.0030.04716.25
5.4.90.0100.07016.47
5.4.80.0030.07316.67
5.4.70.0000.07316.29
5.4.60.0070.07716.29
5.4.50.0100.07316.36
5.4.40.0070.07016.38
5.4.30.0100.07016.24
5.4.20.0100.03716.24
5.4.10.0030.07716.20
5.4.00.0000.07715.93
5.3.290.0030.06714.70
5.3.280.0070.07314.53
5.3.270.0100.04314.77
5.3.260.0130.07014.66
5.3.250.0130.05314.51
5.3.240.0070.06714.62
5.3.230.0030.06314.66
5.3.220.0070.07714.58
5.3.210.0100.06714.62
5.3.200.0070.08314.64
5.3.190.0070.04714.61
5.3.180.0030.08014.57
5.3.170.0130.04314.66
5.3.160.0100.07714.58
5.3.150.0030.07314.61
5.3.140.0030.06314.57
5.3.130.0100.07314.62
5.3.120.0030.06014.60
5.3.110.0000.04314.60
5.3.100.0070.07014.05
5.3.90.0230.03714.03
5.3.80.0070.07014.10
5.3.70.0030.04714.03
5.3.60.0030.07713.94
5.3.50.0070.05714.01
5.3.40.0070.04013.95
5.3.30.0000.07313.98
5.3.20.0070.07013.75
5.3.10.0000.04713.64
5.3.00.0000.04313.68
5.2.170.0030.04011.22
5.2.160.0000.03711.31
5.2.150.0070.06711.05
5.2.140.0030.04311.20
5.2.130.0130.02711.12
5.2.120.0000.03311.12
5.2.110.0030.06711.01
5.2.100.0130.02711.07
5.2.90.0030.06011.12
5.2.80.0030.06711.17
5.2.70.0000.06711.14
5.2.60.0070.04310.95
5.2.50.0070.06011.20
5.2.40.0130.05711.01
5.2.30.0030.04311.04
5.2.20.0070.04011.02
5.2.10.0000.05010.84
5.2.00.0100.05710.65
5.1.60.0030.05310.03
5.1.50.0000.02710.03
5.1.40.0170.04710.00
5.1.30.0070.05310.35
5.1.20.0000.03010.42
5.1.10.0000.03010.07
5.1.00.0000.02710.08
5.0.50.0000.0208.54
5.0.40.0030.0438.41
5.0.30.0000.0338.25
5.0.20.0000.0238.21
5.0.10.0000.0238.18
5.0.00.0030.0278.07
4.4.90.0000.0378.07
4.4.80.0000.0308.07
4.4.70.0000.0308.07
4.4.60.0030.0338.07
4.4.50.0070.0308.07
4.4.40.0030.0278.07
4.4.30.0030.0378.07
4.4.20.0030.0278.07
4.4.10.0030.0138.07
4.4.00.0000.0238.07
4.3.110.0030.0138.07
4.3.100.0030.0138.07
4.3.90.0000.0138.07
4.3.80.0000.0238.07
4.3.70.0000.0138.07
4.3.60.0000.0178.07
4.3.50.0070.0108.07
4.3.40.0000.0238.07
4.3.30.0030.0138.07
4.3.20.0030.0138.07
4.3.10.0000.0178.07
4.3.00.0000.0178.07

preferences:
41 ms | 400 KiB | 5 Q