3v4l.org

run code in 300+ PHP versions simultaneously
<?hh class AnnotatedClass { public int $x; private string $s; protected array $arr; public AnotherClass $ac; function bar(string $str, bool $b): string { if ($b && $str === "Hi") { return 3.2; } return 0.3; } }

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.0130.00718.54
8.3.30.0030.01018.97
8.3.20.0050.00220.18
8.3.10.0080.00020.48
8.3.00.0030.00619.26
8.2.170.0100.00722.96
8.2.160.0120.00320.39
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00022.22
8.2.110.0040.00422.14
8.2.100.0040.00817.91
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0070.00018.19
8.2.30.0000.00819.34
8.2.20.0060.00317.42
8.2.10.0030.00617.92
8.2.00.0040.00417.58
8.1.270.0050.00522.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.14
8.1.230.0110.00019.05
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.10
8.1.190.0080.00017.23
8.1.180.0000.00718.10
8.1.170.0040.00418.50
8.1.160.0070.00021.94
8.1.150.0040.00418.71
8.1.140.0070.00017.23
8.1.130.0000.00717.68
8.1.120.0070.00017.27
8.1.110.0070.00017.30
8.1.100.0030.00317.21
8.1.90.0050.00217.33
8.1.80.0030.00517.31
8.1.70.0000.00717.25
8.1.60.0040.00417.31
8.1.50.0030.00517.38
8.1.40.0080.00017.36
8.1.30.0000.00817.52
8.1.20.0080.00017.51
8.1.10.0000.00817.43
8.1.00.0050.00317.41
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0030.00318.27
8.0.270.0070.00017.07
8.0.260.0000.00617.08
8.0.250.0000.00716.77
8.0.240.0030.00316.79
8.0.230.0030.00316.82
8.0.220.0060.00016.81
8.0.210.0040.00416.64
8.0.200.0030.00316.81
8.0.190.0040.00416.80
8.0.180.0080.00016.80
8.0.170.0000.00716.73
8.0.160.0000.00716.63
8.0.150.0000.00716.61
8.0.140.0060.00316.75
8.0.130.0030.00313.31
8.0.120.0000.00816.73
8.0.110.0050.00216.64
8.0.100.0050.00316.81
8.0.90.0000.00816.76
8.0.80.0100.01016.68
8.0.70.0040.00416.68
8.0.60.0040.00416.86
8.0.50.0040.00416.69
8.0.30.0120.00716.92
8.0.20.0110.00917.40
8.0.10.0040.00416.89
8.0.00.0120.00916.58
7.4.330.0000.00415.00
7.4.320.0070.00016.43
7.4.300.0030.00316.50
7.4.290.0030.00316.54
7.4.280.0040.00416.33
7.4.270.0000.00816.41
7.4.260.0030.00316.48
7.4.250.0030.00316.43
7.4.240.0040.00416.35
7.4.230.0030.00316.54
7.4.220.0070.01016.46
7.4.210.0000.01316.43
7.4.200.0070.00016.48
7.4.160.0090.00616.32
7.4.150.0030.01417.40
7.4.140.0080.01017.86
7.4.130.0090.00816.30
7.4.120.0110.00716.29
7.4.110.0100.00616.34
7.4.100.0120.01216.36
7.4.90.0050.01116.27
7.4.80.0000.01819.39
7.4.70.0070.01116.33
7.4.60.0120.00316.36
7.4.50.0040.00416.43
7.4.40.0030.01316.42
7.4.30.0160.00316.43
7.3.330.0030.00312.97
7.3.320.0000.00513.08
7.3.310.0070.00015.95
7.3.300.0070.00016.07
7.3.290.0030.01316.09
7.3.280.0080.00816.14
7.3.270.0090.00917.40
7.3.260.0090.00916.23
7.3.250.0090.01016.41
7.3.240.0120.00416.29
7.3.230.0090.00916.39
7.3.210.0120.00416.17
7.3.200.0070.01019.39
7.3.190.0130.00316.08
7.3.180.0090.00616.28
7.3.170.0130.00616.36
7.3.160.0090.01216.08
7.2.330.0060.01516.17
7.2.320.0080.00916.31
7.2.310.0080.01116.24
7.2.300.0090.01016.46
7.2.290.0160.00016.49
5.4.320.0070.03412.45
5.4.310.0070.03612.45
5.4.300.0040.03812.45
5.4.290.0070.03712.45
5.4.280.0060.04712.34
5.4.270.0060.03512.34
5.4.260.0060.03712.35
5.4.250.0050.04112.34
5.4.240.0100.04812.34
5.4.230.0050.03812.34
5.4.220.0060.04112.34
5.4.210.0080.04012.34
5.4.200.0040.03912.34
5.4.190.0080.03312.33
5.4.180.0050.03612.33
5.4.170.0090.04712.34
5.4.160.0070.04312.34
5.4.150.0040.03712.34
5.4.140.0090.04512.02
5.4.130.0060.03612.01
5.4.120.0090.04211.96
5.4.110.0060.03411.96
5.4.100.0080.03111.96
5.4.90.0050.04411.96
5.4.80.0070.05111.96
5.4.70.0110.03811.96
5.4.60.0050.03511.96
5.4.50.0050.03511.96
5.4.40.0080.03211.95
5.4.30.0070.03311.95
5.4.20.0050.03611.95
5.4.10.0050.03711.95
5.4.00.0060.04911.44

preferences:
37.35 ms | 400 KiB | 5 Q