3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bars = []; public function addBar(Bar $bar) { $this->bars[] = $bar; } } class Bar { protected $value; public function __construct($value) { $this->value = $value; } } $foo = new Foo; $foo->addBar(new Bar('baz')); $foo->addBar(new Bar(42)); $foo = serialize($foo); echo $foo, PHP_EOL; $foo = unserialize($foo); var_dump($foo);

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.0120.00616.63
8.3.50.0120.00822.00
8.3.40.0110.00318.69
8.3.30.0200.00019.15
8.3.20.0030.00520.01
8.3.10.0080.00023.66
8.3.00.0040.00419.38
8.2.180.0150.00018.36
8.2.170.0140.00322.96
8.2.160.0140.00020.21
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0070.00022.11
8.2.110.0070.00321.06
8.2.100.0070.00417.84
8.2.90.0000.00819.34
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0080.00017.93
8.2.50.0060.00818.07
8.2.40.0000.00820.07
8.2.30.0030.00518.03
8.2.20.0000.00817.65
8.2.10.0080.00018.18
8.2.00.0090.00017.62
8.1.280.0130.00725.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0080.00419.00
8.1.220.0000.00817.78
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0050.00318.60
8.1.160.0020.00521.82
8.1.150.0000.00718.62
8.1.140.0000.00817.39
8.1.130.0040.00417.87
8.1.120.0040.00417.42
8.1.110.0040.00417.41
8.1.100.0000.00717.39
8.1.90.0000.00817.32
8.1.80.0000.00817.41
8.1.70.0000.00817.35
8.1.60.0040.00417.62
8.1.50.0040.00417.40
8.1.40.0030.00617.44
8.1.30.0000.00817.48
8.1.20.0060.00317.70
8.1.10.0040.00417.60
8.1.00.0000.00717.47
8.0.300.0080.00018.77
8.0.290.0020.00516.75
8.0.280.0020.00518.32
8.0.270.0000.00717.33
8.0.260.0050.00317.16
8.0.250.0000.00716.89
8.0.240.0080.00017.02
8.0.230.0030.00316.80
8.0.220.0030.00316.91
8.0.210.0040.00416.90
8.0.200.0040.00416.95
8.0.190.0030.00616.98
8.0.180.0040.00416.91
8.0.170.0040.00416.90
8.0.160.0070.00016.99
8.0.150.0000.00716.79
8.0.140.0030.00516.84
8.0.130.0030.00313.31
8.0.120.0030.00616.86
8.0.110.0040.00416.79
8.0.100.0050.00316.76
8.0.90.0030.00316.75
8.0.80.0160.00716.87
8.0.70.0070.00017.01
8.0.60.0080.00016.71
8.0.50.0070.00016.89
8.0.30.0140.00817.32
8.0.20.0100.00917.40
8.0.10.0070.00016.98
8.0.00.0140.00716.95
7.4.330.0000.00515.00
7.4.320.0040.00416.54
7.4.300.0030.00316.59
7.4.290.0040.00416.59
7.4.280.0030.00316.41
7.4.270.0030.00516.45
7.4.260.0000.00716.57
7.4.250.0000.00816.42
7.4.240.0020.00516.51
7.4.230.0000.00716.59
7.4.220.0040.01516.54
7.4.210.0060.01016.57
7.4.200.0050.00216.63
7.4.190.0080.00016.74
7.4.160.0050.01016.36
7.4.150.0120.00617.40
7.4.140.0070.00917.86
7.4.130.0070.01116.53
7.4.120.0130.00516.61
7.4.110.0080.00816.52
7.4.100.0040.01516.46
7.4.90.0060.01216.50
7.4.80.0060.01519.39
7.4.70.0080.00816.54
7.4.60.0080.00816.55
7.4.50.0040.00416.35
7.4.40.0080.00816.57
7.4.30.0080.00816.67
7.4.00.0080.00815.03
7.3.330.0000.00613.21
7.3.320.0060.00013.06
7.3.310.0050.00216.15
7.3.300.0030.00316.20
7.3.290.0060.00916.29
7.3.280.0060.01316.30
7.3.270.0110.01317.40
7.3.260.0180.00916.48
7.3.250.0100.00716.48
7.3.240.0130.00616.50
7.3.230.0130.00316.52
7.3.210.0060.01216.22
7.3.200.0100.01219.39
7.3.190.0090.01516.44
7.3.180.0090.01216.39
7.3.170.0050.01116.34
7.3.160.0030.01216.63
7.3.120.0000.01114.98
7.3.10.0090.00616.68
7.3.00.0040.01116.62
7.2.330.0120.00616.44
7.2.320.0090.00916.54
7.2.310.0140.00316.80
7.2.300.0070.01016.87
7.2.290.0150.00316.70
7.2.130.0000.01816.95
7.2.120.0030.01317.01
7.2.110.0090.00616.70
7.2.100.0120.00016.92
7.2.90.0070.00716.55
7.2.80.0030.00916.95
7.2.70.0100.00016.67
7.2.60.0050.01016.99
7.2.50.0110.00716.39
7.2.40.0110.00716.62
7.2.30.0110.00416.80
7.2.20.0040.00717.01
7.2.10.0090.00616.61
7.2.00.0080.00518.31
7.1.250.0070.00315.85
7.1.200.0060.00615.92
7.1.100.0040.00717.95
7.1.70.0000.00717.16
7.1.60.0070.01017.11
7.1.50.0090.00917.11
7.1.40.0040.00717.11
7.1.30.0000.01217.11
7.1.20.0110.01117.11
7.1.10.0040.00417.11
7.1.00.0000.00717.11
7.0.200.0030.00917.11
7.0.190.0000.00917.11
7.0.180.0000.00817.11
7.0.170.0050.00517.11
7.0.160.0040.01517.11
7.0.150.0040.00417.11
7.0.140.0000.00817.11
7.0.130.0000.01017.11
7.0.120.0000.01617.11
7.0.110.0040.00417.11
7.0.100.0030.00817.11
7.0.90.0000.00717.11
7.0.80.0050.00217.11
7.0.70.0030.00617.11
7.0.60.0000.00817.11
7.0.50.0040.00417.11
7.0.40.0070.00317.11
7.0.30.0030.01017.11
7.0.20.0000.00817.11
7.0.10.0030.00617.11
7.0.00.0000.01117.11
5.6.300.0030.04020.83
5.6.290.0100.04020.79
5.6.280.0070.04020.88
5.6.270.0070.08421.04
5.6.260.0070.04020.96
5.6.250.0070.04021.02
5.6.240.0040.04620.88
5.6.230.0070.04420.98
5.6.220.0070.04020.94
5.6.210.0000.05220.60
5.6.200.0030.04120.78
5.6.190.0030.04421.02
5.6.180.0000.04220.88
5.6.170.0040.03920.83
5.6.160.0030.04420.85
5.6.150.0000.04520.89
5.6.140.0030.04020.74
5.6.130.0030.07121.01
5.6.120.0100.03720.84
5.6.110.0070.06920.95
5.6.100.0000.04820.91
5.6.90.0000.04221.00
5.6.80.0060.03520.23
5.6.70.0030.03820.30
5.6.60.0100.03320.23
5.6.50.0040.03920.21
5.6.40.0070.04320.36
5.6.30.0030.08920.38
5.6.20.0070.04620.38
5.6.10.0000.05620.13
5.6.00.0070.07120.30
5.5.380.0000.04717.65
5.5.370.0000.04417.58
5.5.360.0100.03717.45
5.5.350.0140.04217.45
5.5.340.0000.04618.03
5.5.330.0130.04118.18
5.5.320.0070.03617.71
5.5.310.0070.03918.18
5.5.300.0030.05517.84
5.5.290.0100.03818.00
5.5.280.0060.03818.12
5.5.270.0030.04917.85
5.5.260.0000.04418.03
5.5.250.0070.03617.52
5.5.240.0060.07817.39
5.5.230.0070.05317.50
5.5.220.0030.04117.25
5.5.210.0070.05417.48
5.5.200.0030.03717.53
5.5.190.0030.04417.48
5.5.180.0070.06717.43
5.5.160.0000.05217.44
5.5.150.0130.03617.38
5.5.140.0030.03817.11
5.5.130.0030.07317.43
5.5.120.0030.03717.18
5.5.110.0070.06317.11
5.5.100.0000.05117.29
5.5.90.0060.03417.11
5.5.80.0100.06717.34
5.5.70.0000.04117.31
5.5.60.0030.03917.11
5.5.50.0070.03617.11
5.5.40.0000.04217.34
5.5.30.0030.03817.33
5.5.20.0070.03417.26
5.5.10.0030.03617.25
5.5.00.0030.03817.11
5.4.450.0000.04519.37
5.4.440.0000.04419.40
5.4.430.0000.04519.25
5.4.420.0060.03819.36
5.4.410.0000.04319.20
5.4.400.0030.07218.99
5.4.390.0000.05418.95
5.4.380.0000.04218.87
5.4.370.0060.04118.89
5.4.360.0030.04018.94
5.4.350.0000.06219.19
5.4.340.0100.07419.16
5.4.320.0030.06819.07
5.4.310.0100.03718.93
5.4.300.0030.07619.05
5.4.290.0030.05219.05
5.4.280.0000.04319.04
5.4.270.0000.04019.19
5.4.260.0200.03019.20
5.4.250.0070.07119.03
5.4.240.0000.04219.13
5.4.230.0000.04018.90
5.4.220.0070.04219.03
5.4.210.0030.04018.88
5.4.200.0170.03818.91
5.4.190.0030.03918.89
5.4.180.0030.03818.90
5.4.170.0030.04019.07
5.4.160.0000.04219.04
5.4.150.0000.04319.14
5.4.140.0030.03617.11
5.4.130.0030.03317.11
5.4.120.0030.03717.11
5.4.110.0000.04317.11
5.4.100.0070.03317.11
5.4.90.0070.03317.11
5.4.80.0030.03517.11
5.4.70.0030.03617.11
5.4.60.0070.07417.11
5.4.50.0070.05717.11
5.4.40.0000.03717.11
5.4.30.0030.04617.11
5.4.20.0170.03817.11
5.4.10.0060.03517.11
5.4.00.0030.03617.11
5.3.290.0070.03617.11
5.3.280.0070.03217.11
5.3.270.0000.05617.11
5.3.260.0000.05817.11
5.3.250.0040.03617.11
5.3.240.0030.03617.11
5.3.230.0030.03817.11
5.3.220.0000.05617.11
5.3.210.0030.04217.11
5.3.200.0060.04117.11
5.3.190.0100.04017.11
5.3.180.0030.04017.11
5.3.170.0030.03417.11
5.3.160.0000.07317.11
5.3.150.0070.06117.11
5.3.140.0070.05117.11
5.3.130.0000.04017.11
5.3.120.0000.04017.11
5.3.110.0000.04017.11
5.3.100.0030.07517.11
5.3.90.0030.05117.11
5.3.80.0000.03917.11
5.3.70.0030.03417.11
5.3.60.0000.04017.11
5.3.50.0030.03717.11
5.3.40.0070.03117.11
5.3.30.0230.03217.11
5.3.20.0000.03717.11
5.3.10.0000.03517.11
5.3.00.0000.04917.11
5.2.170.0070.02717.11
5.2.160.0000.03817.11
5.2.150.0060.02617.11
5.2.140.0030.03017.11
5.2.130.0000.04717.11
5.2.120.0000.03517.11
5.2.110.0030.02717.11
5.2.100.0030.02917.11
5.2.90.0000.02917.11
5.2.80.0000.06217.11
5.2.70.0030.03017.11
5.2.60.0060.03817.11
5.2.50.0040.02917.11
5.2.40.0000.03217.11
5.2.30.0030.02717.11
5.2.20.0070.02717.11
5.2.10.0000.03217.11
5.2.00.0030.03917.11
5.1.60.0130.02317.11
5.1.50.0100.03017.11
5.1.40.0030.02917.11
5.1.30.0060.02417.11
5.1.20.0070.02417.11
5.1.10.0070.05917.11
5.1.00.0030.02517.11
5.0.50.0030.02417.11
5.0.40.0000.02517.11
5.0.30.0000.03517.11
5.0.20.0000.02117.11
5.0.10.0070.02017.11
5.0.00.0100.03017.11
4.4.90.0030.01517.11
4.4.80.0030.01317.11
4.4.70.0070.01317.11
4.4.60.0040.01517.11
4.4.50.0030.01417.11
4.4.40.0030.02217.11
4.4.30.0000.01817.11
4.4.20.0000.01717.11
4.4.10.0000.01817.11
4.4.00.0030.02517.11
4.3.110.0030.01317.11
4.3.100.0030.01517.11
4.3.90.0000.02317.11
4.3.80.0000.02617.11
4.3.70.0000.01617.11
4.3.60.0030.01517.11
4.3.50.0040.01417.11
4.3.40.0030.02917.11
4.3.30.0000.02017.11
4.3.20.0000.01717.11
4.3.10.0040.01417.11
4.3.00.0040.01517.11

preferences:
42.85 ms | 401 KiB | 5 Q