3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(int $n, bool $m): string { $m = $m ? 'true' : 'false'; return "The number {$n} is called {$m}"; } $a = [1, 2, 3, 4, 5]; $c = array_map('hello', $a, array_fill(0,count($a),true)); print_r($c);

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.00817.58
8.4.130.0130.00917.61
8.4.120.0130.00724.23
8.4.110.0130.00622.53
8.4.100.0090.00817.80
8.4.90.0130.00720.62
8.4.80.0120.00618.77
8.4.70.0090.01118.07
8.4.60.0100.01018.60
8.4.50.0030.00618.59
8.4.40.0060.01317.94
8.4.30.0120.00320.46
8.4.20.0110.00817.78
8.4.10.0040.00417.81
8.3.270.0100.01016.50
8.3.260.0120.01016.42
8.3.250.0090.00918.73
8.3.240.0100.01017.12
8.3.230.0130.00716.55
8.3.220.0090.00919.01
8.3.210.0080.00916.41
8.3.200.0070.00216.63
8.3.190.0100.00917.04
8.3.180.0100.00918.40
8.3.170.0120.00617.01
8.3.160.0060.01020.28
8.3.150.0070.01117.04
8.3.140.0030.00616.53
8.3.130.0080.00416.55
8.3.120.0070.00720.89
8.3.110.0000.00820.94
8.3.100.0130.00624.06
8.3.90.0070.00026.77
8.3.80.0030.00616.63
8.3.70.0120.00316.58
8.3.60.0120.00316.36
8.3.50.0140.00018.04
8.3.40.0100.00320.20
8.3.30.0080.00818.54
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.290.0120.00620.24
8.2.280.0110.00718.29
8.2.270.0140.00418.80
8.2.260.0060.00316.43
8.2.250.0040.01118.25
8.2.240.0050.00317.06
8.2.230.0060.00322.58
8.2.220.0060.00937.54
8.2.210.0000.00826.77
8.2.200.0070.00416.25
8.2.190.0150.01216.58
8.2.180.0120.00325.92
8.2.170.0070.01318.88
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00019.95
8.2.110.0000.00920.35
8.2.100.0060.00617.72
8.2.90.0000.00817.75
8.2.80.0080.00018.95
8.2.70.0080.00017.50
8.2.60.0040.00418.03
8.2.50.0030.00618.05
8.2.40.0000.00718.22
8.2.30.0080.00017.88
8.2.20.0000.00820.41
8.2.10.0070.00017.84
8.2.00.0130.00019.31
8.1.330.0110.00721.79
8.1.320.0090.01116.08
8.1.310.0120.00618.56
8.1.300.0040.00416.26
8.1.290.0030.00718.88
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0120.00326.35
8.1.250.0040.00428.09
8.1.240.0000.01019.13
8.1.230.0110.00017.77
8.1.220.0090.00017.79
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0050.00319.13
8.1.160.0040.00418.80
8.1.150.0040.00418.60
8.1.140.0020.00517.45
8.1.130.0000.00718.85
8.1.120.0080.00017.46
8.1.110.0050.00317.42
8.1.100.0050.00217.51
8.1.90.0000.00717.35
8.1.80.0040.00417.46
8.1.70.0040.00417.35
8.1.60.0050.00317.58
8.1.50.0000.00817.43
8.1.40.0070.00017.52
8.1.30.0000.00817.70
8.1.20.0090.00017.68
8.1.10.0050.00717.51
8.1.00.0100.00317.35
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0040.00418.43
8.0.270.0070.00016.86
8.0.260.0000.00618.44
8.0.250.0030.00317.00
8.0.240.0040.00416.96
8.0.230.0030.00316.94
8.0.220.0000.00716.77
8.0.210.0040.00416.77
8.0.200.0030.00316.94
8.0.190.0000.00816.84
8.0.180.0040.00416.81
8.0.170.0000.00816.91
8.0.160.0070.00016.91
8.0.150.0040.00416.79
8.0.140.0070.00516.78
8.0.130.0110.00116.75
8.0.120.0060.00716.89
8.0.110.0060.00316.76
8.0.100.0070.00416.88
8.0.90.0040.00616.88
8.0.80.0060.00416.84
8.0.70.0090.00116.90
8.0.60.0060.00316.76
8.0.50.0030.00516.89
8.0.30.0040.00416.86
8.0.20.0030.00516.81
8.0.10.0050.00516.95
7.4.330.0020.00215.55
7.4.320.0000.00616.58
7.4.300.0040.00416.64
7.4.290.0030.00316.45
7.4.280.0040.00416.51
7.4.270.0050.00316.48
7.4.260.0000.00716.57
7.4.250.0030.00316.48
7.4.240.0020.00516.57
7.4.230.0020.00516.48
7.4.220.0050.00216.47
7.4.210.0030.00316.39
7.4.200.0030.00316.53
7.4.190.0020.00516.55
7.4.180.0040.00316.52
7.4.160.0030.00416.55
7.4.150.0030.00316.45
7.4.140.0000.00716.38
7.4.130.0050.00216.33
7.4.120.0020.00516.45
7.4.110.0070.00016.41
7.4.100.0050.00216.50
7.4.90.0020.00516.38
7.4.80.0070.00016.30
7.4.70.0030.00316.44
7.4.60.0050.00216.33
7.4.50.0050.00316.31
7.4.40.0050.00316.35
7.4.30.0030.00516.49
7.4.20.0020.00516.38
7.4.10.0010.00616.45
7.4.00.0050.00216.49

preferences:
121.93 ms | 403 KiB | 5 Q