3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $i = 0; public function method() { return $this->i++; } } $short = [0, 1, 2]; $long = [0, 1, 2]; $foo1 = new Foo(); $foo2 = new Foo(); $long[$foo1->method()] + $long[$foo1->method()] = 1; $short[$foo2->method()] += 1; var_dump($long, $short);

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.00618.43
8.3.50.0000.01518.30
8.3.40.0110.00718.84
8.3.30.0110.00418.68
8.3.20.0070.00719.07
8.3.10.0080.00021.95
8.3.00.0080.00019.55
8.2.180.0110.00318.41
8.2.170.0000.01422.96
8.2.160.0100.01020.43
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0020.00521.04
8.2.120.0050.00226.35
8.2.110.0070.00321.00
8.2.100.0060.00919.45
8.2.90.0000.00817.63
8.2.80.0080.00018.84
8.2.70.0040.00417.89
8.2.60.0040.00417.38
8.2.50.0080.00017.63
8.2.40.0030.00917.74
8.2.30.0000.00819.34
8.2.20.0040.00417.97
8.2.10.0070.00018.12
8.2.00.0030.00519.60
8.1.280.0110.00425.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0060.00319.09
8.1.230.0070.00319.15
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0080.00017.13
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0030.00720.14
8.1.160.0000.00718.78
8.1.150.0030.00320.14
8.1.140.0050.00219.51
8.1.130.0080.00318.96
8.1.120.0000.00717.41
8.1.110.0050.00317.44
8.1.100.0050.00317.34
8.1.90.0050.00217.29
8.1.80.0000.00817.28
8.1.70.0000.00717.30
8.1.60.0060.00317.60
8.1.50.0030.00517.54
8.1.40.0000.00717.50
8.1.30.0000.00817.65
8.1.20.0000.00717.64
8.1.10.0040.00417.48
8.1.00.0080.00017.51
8.0.300.0070.00018.77
8.0.290.0080.00016.63
8.0.280.0070.00018.42
8.0.270.0000.00717.25
8.0.260.0000.00617.36
8.0.250.0070.00016.91
8.0.240.0030.00316.83
8.0.230.0030.00316.82
8.0.220.0070.00016.74
8.0.210.0070.00016.82
8.0.200.0060.00016.91
8.0.190.0100.00016.91
8.0.180.0040.00416.88
8.0.170.0050.00316.83
8.0.160.0000.00716.75
8.0.150.0000.00816.62
8.0.140.0050.00316.78
8.0.130.0000.00513.36
8.0.120.0080.00016.77
8.0.110.0050.00316.81
8.0.100.0040.00416.87
8.0.90.0070.00016.93
8.0.80.0060.01316.82
8.0.70.0070.00016.81
8.0.60.0040.00416.82
8.0.50.0000.00816.63
8.0.30.0120.00717.04
8.0.20.0100.00917.40
8.0.10.0030.00616.95
8.0.00.0130.01216.71
7.4.330.0030.00315.55
7.4.320.0000.00716.57
7.4.300.0060.00016.42
7.4.290.0000.00716.59
7.4.280.0040.00416.64
7.4.270.0060.00016.61
7.4.260.0030.00716.48
7.4.250.0020.00516.45
7.4.240.0050.00216.46
7.4.230.0040.00416.32
7.4.220.0070.01416.48
7.4.210.0120.01016.55
7.4.200.0070.00016.62
7.4.160.0090.00716.38
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0090.01116.50
7.4.120.0110.00716.56
7.4.110.0130.00716.59
7.4.100.0180.00016.29
7.4.90.0150.00916.35
7.4.80.0170.01119.39
7.4.70.0040.01616.63
7.4.60.0070.01016.41
7.4.50.0070.00716.30
7.4.40.0070.00716.37
7.4.30.0170.00016.64
7.4.00.0090.00615.01
7.3.330.0000.00613.38
7.3.320.0000.00513.22
7.3.310.0030.00316.39
7.3.300.0030.00316.24
7.3.290.0050.00316.37
7.3.280.0070.00916.35
7.3.270.0120.00617.40
7.3.260.0120.00616.52
7.3.250.0080.01116.30
7.3.240.0100.00816.48
7.3.230.0000.01716.58
7.3.210.0100.01016.49
7.3.200.0070.01016.50
7.3.190.0130.00916.32
7.3.180.0110.00516.41
7.3.170.0100.00616.44
7.3.160.0070.01016.31
7.3.10.0070.00716.57
7.3.00.0120.00316.48
7.2.330.0140.00316.70
7.2.320.0080.01116.73
7.2.310.0100.01016.84
7.2.300.0090.00916.47
7.2.290.0160.00316.50
7.2.130.0070.00416.87
7.2.120.0040.01216.83
7.2.110.0060.00616.99
7.2.100.0070.00417.06
7.2.90.0080.00817.03
7.2.80.0100.00716.86
7.2.70.0030.01217.07
7.2.60.0100.00517.00
7.2.50.0020.01517.03
7.2.40.0040.00816.92
7.2.30.0070.01116.85
7.2.20.0070.01016.96
7.2.10.0030.00716.91
7.2.00.0140.00016.79
7.1.250.0070.01015.80
7.1.200.0080.00815.73
7.1.70.0050.00217.07
7.1.60.0000.01417.28
7.1.00.0800.05720.80
7.0.200.0000.01016.66
7.0.140.1100.06720.21
7.0.130.0830.05320.23
7.0.120.0670.06720.31
7.0.110.0770.05020.25
7.0.100.0770.05320.34
7.0.90.1000.05020.40
7.0.80.0800.06720.21
7.0.70.1570.07020.32
7.0.60.1370.06720.27
7.0.50.0730.06020.38
7.0.40.0930.05320.26
7.0.30.0800.07720.36
7.0.20.0830.06320.30
7.0.10.0670.06020.39
7.0.00.0700.06020.39
5.6.290.0130.05720.86
5.6.280.0100.06021.11
5.6.270.0070.07720.79
5.6.260.0000.06321.05
5.6.250.0200.05020.95
5.6.240.0170.05720.89
5.6.230.0030.06720.88
5.6.220.0270.07020.79
5.6.210.0270.06021.00
5.6.200.0100.06020.74
5.6.190.0000.07021.09
5.6.180.0230.05321.02
5.6.170.0200.05721.05
5.6.160.0000.06721.04
5.6.150.0100.05721.08
5.6.140.0030.06321.08
5.6.130.0070.06021.05
5.6.120.0170.05320.88
5.6.110.0170.05321.07
5.6.100.0070.06320.80
5.6.90.0070.05720.97
5.6.80.0170.06020.43
5.6.70.0070.05720.29
5.6.60.0100.05320.11
5.6.50.0170.04720.41
5.6.40.0030.05720.24
5.6.30.0030.06320.38
5.6.20.0100.05720.22
5.6.10.0100.05320.21
5.6.00.0100.07320.16

preferences:
68.19 ms | 400 KiB | 5 Q