3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function test(int $a, int $i = null): void { if ($i === NULL) print("error\n"); else var_dump($i); } test(1, null); test(2, 32); test(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.4.140.0120.00917.54
8.4.130.0040.00517.80
8.4.120.0050.00320.59
8.4.110.0080.00822.18
8.4.100.0120.00817.63
8.4.90.0090.00918.58
8.4.80.0110.00917.68
8.4.70.0070.01217.79
8.4.60.0130.00718.41
8.4.50.0110.00519.45
8.4.40.0160.00319.42
8.4.30.0190.00319.02
8.4.20.0000.00819.68
8.4.10.0140.00323.49
8.3.270.0130.00716.43
8.3.260.0140.00516.75
8.3.250.0090.00818.98
8.3.240.0130.00616.27
8.3.230.0120.00716.52
8.3.220.0070.00618.73
8.3.210.0120.00616.61
8.3.200.0120.00716.40
8.3.190.0120.00717.14
8.3.180.0100.01016.50
8.3.170.0120.00620.57
8.3.160.0160.00316.64
8.3.150.0170.00316.90
8.3.140.0040.00416.50
8.3.130.0050.00318.59
8.3.120.0060.00318.81
8.3.110.0040.00420.94
8.3.100.0030.00716.62
8.3.90.0050.00326.77
8.3.80.0050.00518.18
8.3.70.0110.00716.63
8.3.60.0110.00718.43
8.3.50.0070.00716.62
8.3.40.0120.00823.80
8.3.30.0000.01418.77
8.3.20.0000.00724.18
8.3.10.0000.00924.66
8.3.00.0000.00726.16
8.2.290.0090.00620.35
8.2.280.0030.00519.91
8.2.270.0110.00718.91
8.2.260.0110.00716.53
8.2.250.0070.00016.61
8.2.240.0030.00616.69
8.2.230.0090.00022.58
8.2.220.0030.00524.06
8.2.210.0080.00026.77
8.2.200.0080.00318.41
8.2.190.0070.00717.89
8.2.180.0140.00316.38
8.2.170.0060.00918.93
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0100.00024.66
8.2.130.0060.00326.16
8.2.120.0000.00826.16
8.2.110.0070.00321.11
8.2.100.0040.00717.78
8.2.90.0040.00417.63
8.2.80.0000.00918.66
8.2.70.0060.00317.50
8.2.60.0000.00817.50
8.2.50.0050.00317.55
8.2.40.0040.00419.23
8.2.30.0100.00317.54
8.2.20.0090.00017.44
8.2.10.0050.01017.50
8.2.00.0090.00617.47
8.1.330.0130.00620.38
8.1.320.0120.00715.91
8.1.310.0110.00418.29
8.1.300.0190.00015.94
8.1.290.0090.00030.84
8.1.280.0100.00725.92
8.1.270.0000.00824.66
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0030.00619.16
8.1.230.0060.00617.57
8.1.220.0030.00618.44
8.1.210.0060.00318.77
8.1.200.0080.00017.23
8.1.190.0050.00317.10
8.1.180.0060.00318.10
8.1.170.0030.00617.62
8.1.160.0080.00417.20
8.1.150.0160.00017.21
8.1.140.0100.00617.25
8.1.130.0160.00017.26
8.1.120.0100.00617.32
8.1.110.0160.00017.21
8.1.100.0100.00517.24
8.1.90.0100.00517.24
8.1.80.0110.00517.32
8.1.70.0100.00617.36
8.1.60.0120.00617.52
8.1.50.0140.00317.43
8.1.40.0140.00717.51
8.1.30.0160.00317.57
8.1.20.0080.00817.50
8.1.10.0130.00617.44
8.1.00.0130.00417.31
8.0.300.0000.00718.77
8.0.290.0050.00216.62
8.0.280.0100.00316.73
8.0.270.0120.00416.73
8.0.260.0130.00016.73
8.0.250.0140.00016.73
8.0.240.0090.00016.73
8.0.230.0030.00616.74
8.0.220.0110.00016.73
8.0.210.0120.00016.73
8.0.200.0000.01016.73
8.0.190.0060.00616.73
8.0.180.0120.00216.73
8.0.170.0030.00916.73
8.0.160.0000.01016.73
8.0.150.0070.00516.73
8.0.140.0100.00316.73
8.0.130.0000.00816.73
8.0.120.0070.00716.73
8.0.110.0100.00416.73
8.0.100.0090.00616.73
8.0.90.0040.01116.73
8.0.80.0150.00016.73
8.0.70.0100.00516.73
8.0.60.0070.00716.73
8.0.50.0050.01016.73
8.0.30.0080.00816.73
8.0.20.0100.00516.73
8.0.10.0140.00016.73

preferences:
100.73 ms | 403 KiB | 5 Q