3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; // Our closure $a["double"] = function($a) { return $a * 2; }; // This is our range of numbers $numbers = range(1, 5); // Use the closure as a callback here to // double the size of each element in our // range $new_numbers = array_map($a["double"], $numbers); print implode(' ', $new_numbers);

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.70.0070.00718.31
8.3.60.0120.00318.54
8.3.50.0070.00618.24
8.3.40.0120.00618.76
8.3.30.0070.00718.85
8.3.20.0070.00019.31
8.3.10.0020.00521.72
8.3.00.0050.00319.80
8.2.190.0090.00616.82
8.2.180.0140.00718.29
8.2.170.0070.01022.96
8.2.160.0120.00318.98
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00019.64
8.2.120.0070.00026.35
8.2.110.0030.00620.35
8.2.100.0000.01117.78
8.2.90.0080.00017.88
8.2.80.0030.00518.86
8.2.70.0090.00017.93
8.2.60.0050.00318.28
8.2.50.0050.00318.10
8.2.40.0000.00819.43
8.2.30.0000.00819.33
8.2.20.0070.00018.19
8.2.10.0000.00718.15
8.2.00.0030.00519.48
8.1.280.0100.00325.92
8.1.270.0080.00023.91
8.1.260.0000.00726.35
8.1.250.0090.00328.09
8.1.240.0060.00320.53
8.1.230.0070.00420.97
8.1.220.0050.00317.78
8.1.210.0030.00518.77
8.1.200.0060.00617.35
8.1.190.0000.00817.36
8.1.180.0080.00018.89
8.1.170.0040.00418.72
8.1.160.0040.00418.92
8.1.150.0000.00718.62
8.1.140.0050.00317.83
8.1.130.0070.00017.52
8.1.120.0070.00017.46
8.1.110.0040.00417.46
8.1.100.0000.00817.47
8.1.90.0030.00317.43
8.1.80.0030.00317.45
8.1.70.0000.00717.42
8.1.60.0040.00417.64
8.1.50.0040.00417.44
8.1.40.0100.00017.48
8.1.30.0030.00517.52
8.1.20.0040.00417.63
8.1.10.0030.00617.63
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0030.00516.74
8.0.280.0040.00418.37
8.0.270.0040.00418.02
8.0.260.0030.00316.96
8.0.250.0070.00316.88
8.0.240.0000.00716.95
8.0.230.0030.00316.92
8.0.220.0050.00316.93
8.0.210.0040.00416.72
8.0.200.0090.00016.98
8.0.190.0040.00317.01
8.0.180.0030.00416.90
8.0.170.0060.00316.91
8.0.160.0000.00716.92
8.0.150.0020.00516.80
8.0.140.0000.00716.92
8.0.130.0050.00013.22
8.0.120.0070.00016.74
8.0.110.0000.00816.71
8.0.100.0040.00416.83
8.0.90.0000.00716.79
8.0.80.0150.00316.85
8.0.70.0050.00216.77
8.0.60.0000.00716.79
8.0.50.0070.00016.87
8.0.30.0130.00517.14
8.0.20.0120.01017.40
8.0.10.0000.00716.93
8.0.00.0130.00616.71
7.4.330.0000.00515.55
7.4.320.0030.00316.50
7.4.300.0000.00616.41
7.4.290.0000.00816.50
7.4.280.0030.00516.60
7.4.270.0070.00016.53
7.4.260.0080.00016.50
7.4.250.0030.00316.47
7.4.240.0000.00716.64
7.4.230.0030.00316.42
7.4.220.0090.00016.39
7.4.210.0100.00716.57
7.4.200.0040.00416.64
7.4.160.0100.00516.53
7.4.140.0110.01017.86
7.4.130.0040.01516.56
7.4.120.0090.01016.57
7.4.110.0110.00716.55
7.4.100.0090.01216.31
7.4.90.0100.01316.68
7.4.80.0120.01219.39
7.4.70.0160.00616.62
7.4.60.0130.00316.36
7.4.50.0090.00616.20
7.4.40.0060.01016.44
7.4.00.0000.01614.88
7.3.330.0050.00013.39
7.3.320.0000.00513.34
7.3.310.0000.00716.39
7.3.300.0070.00016.32
7.3.290.0000.00616.36
7.3.280.0080.00716.38
7.3.260.0120.00716.51
7.3.240.0100.00716.43
7.3.230.0160.00316.44
7.3.210.0130.00316.61
7.3.200.0060.01016.38
7.3.190.0060.01416.42
7.3.180.0100.00716.53
7.3.170.0060.00916.47
7.3.160.0040.01116.51
7.2.330.0200.00316.68
7.2.320.0130.00616.76
7.2.310.0120.01016.48
7.2.300.0080.00816.49
7.2.290.0120.00916.51
7.2.80.0000.01416.63
7.2.60.0030.00716.89
7.2.40.1240.00817.98
7.2.30.1700.01018.01
7.2.20.0760.00917.95
7.2.10.0670.00917.81
7.2.00.0750.01217.90
7.1.200.0090.00615.66
7.1.160.0980.01016.38
7.1.150.0760.00916.59
7.1.140.0720.00816.41
7.1.130.0890.00916.67
7.1.120.0780.00916.55
7.1.110.1040.01016.23
7.1.100.0860.00716.20
7.1.90.0760.00816.23
7.1.80.0850.00716.37
7.1.70.0850.00815.38
7.1.60.0860.01033.34
7.1.50.0910.01332.91
7.1.40.0910.01732.55
7.1.30.1000.01332.59
7.1.20.1040.00932.78
7.1.10.0900.01114.79
7.1.00.0820.01314.94

preferences:
57.28 ms | 401 KiB | 5 Q