3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(4,6,2,22,11); sort($numbers); function printArray($nums) { array_reduce($nums, function ($carry, $item) { echo $carry .= $item . "<br>"; }); } printArray($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.5.00.0130.00819.80
8.4.150.0020.00014.05
8.4.140.0120.00817.74
8.4.130.0090.01117.64
8.4.120.0100.01220.45
8.4.110.0110.00918.63
8.4.100.0120.00917.71
8.4.90.0070.00318.73
8.4.80.0040.00619.48
8.4.70.0090.01217.70
8.4.60.0060.00618.59
8.4.50.0110.00822.30
8.4.40.0130.00717.39
8.4.30.0160.00317.64
8.4.20.0030.01717.73
8.4.10.0060.00317.80
8.3.280.0140.00918.26
8.3.270.0120.00816.51
8.3.260.0110.00716.39
8.3.250.0090.00718.84
8.3.240.0090.00916.61
8.3.230.0090.00716.85
8.3.220.0070.00417.07
8.3.210.0100.00816.59
8.3.200.0040.00516.59
8.3.190.0090.01017.28
8.3.180.0110.00718.46
8.3.170.0150.00317.29
8.3.160.0120.00418.48
8.3.150.0110.00718.99
8.3.140.0000.00818.90
8.3.130.0030.00616.45
8.3.120.0060.00320.82
8.3.110.0030.01216.76
8.3.100.0080.00016.46
8.3.90.0060.01226.77
8.3.80.0060.00316.63
8.3.70.0030.02018.15
8.3.60.0100.00718.56
8.3.50.0120.00822.05
8.3.40.0140.00718.84
8.3.30.0070.01118.67
8.3.20.0090.00320.16
8.3.10.0040.00420.57
8.3.00.0070.00021.80
8.2.290.0100.00920.59
8.2.280.0110.00718.20
8.2.270.0040.01117.34
8.2.260.0080.00016.38
8.2.250.0030.00618.45
8.2.240.0040.00417.04
8.2.230.0060.00320.94
8.2.220.0060.00324.06
8.2.210.0030.00526.77
8.2.200.0030.00716.37
8.2.190.0120.00616.58
8.2.180.0090.01318.16
8.2.170.0070.00718.82
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0000.00721.13
8.2.120.0070.00726.35
8.2.110.0080.00320.95
8.2.100.0060.00617.91
8.2.90.0000.00818.16
8.2.80.0030.00617.97
8.2.70.0040.00417.93
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0080.00020.01
8.2.30.0030.00618.04
8.2.20.0080.00017.62
8.2.10.0040.00418.07
8.2.00.0030.00517.97
8.1.330.0100.00921.89
8.1.320.0110.00816.23
8.1.310.0090.00018.21
8.1.300.0030.00518.29
8.1.290.0040.00830.84
8.1.280.0000.01425.92
8.1.270.0040.00423.92
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00423.77
8.1.230.0070.00421.01
8.1.220.0080.00017.79
8.1.210.0050.00518.97
8.1.200.0030.00517.35
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0030.00518.50
8.1.160.0030.00518.79
8.1.150.0050.00218.88
8.1.140.0000.00819.48
8.1.130.0020.00517.68
8.1.120.0040.00417.32
8.1.110.0070.00017.47
8.1.100.0050.00317.29
8.1.90.0000.00717.36
8.1.80.0030.00317.38
8.1.70.0040.00717.51
8.1.60.0090.00017.50
8.1.50.0030.00517.52
8.1.40.0030.00517.50
8.1.30.0040.00417.71
8.1.20.0040.00417.38
8.1.10.0000.00817.55
8.1.00.0080.00417.38
8.0.300.0000.00919.89
8.0.290.0030.00616.75
8.0.280.0040.00418.34
8.0.270.0000.00717.27
8.0.260.0000.00717.17
8.0.250.0040.00416.95
8.0.240.0090.00016.96
8.0.230.0000.00816.90
8.0.220.0000.00716.77
8.0.210.0000.00716.86
8.0.200.0030.00316.93
8.0.190.0040.00416.93
8.0.180.0080.00316.93
8.0.170.0000.00816.80
8.0.160.0030.00317.00
8.0.150.0070.00016.91
8.0.140.0000.00716.87
8.0.130.0050.00013.34
8.0.120.0080.00016.78
8.0.110.0050.00216.75
8.0.100.0040.00416.93
8.0.90.0040.00416.95
8.0.80.0070.00916.81
8.0.70.0040.00416.70
8.0.60.0040.00416.91
8.0.50.0000.00816.84
8.0.30.0090.00816.89
8.0.20.0080.01417.40
8.0.10.0000.00716.89
8.0.00.0120.00716.65
7.4.330.0000.00516.83
7.4.320.0000.00716.41
7.4.300.0000.00616.47
7.4.290.0000.00716.45
7.4.280.0030.00316.60
7.4.270.0030.00316.55
7.4.260.0030.00716.41
7.4.250.0070.00016.54
7.4.240.0030.00516.51
7.4.230.0070.00016.53
7.4.220.0000.02016.52
7.4.210.0060.00916.61
7.4.200.0040.00416.37
7.4.160.0130.00316.45
7.4.150.0040.01517.40
7.4.140.0090.00717.86
7.4.130.0120.00516.57
7.4.120.0130.00516.53
7.4.110.0110.00516.68
7.4.100.0130.00416.54
7.4.90.0060.01216.43
7.4.80.0030.01319.39
7.4.70.0050.01116.58
7.4.60.0040.01216.59
7.4.50.0060.01216.31
7.4.40.0150.00616.68
7.4.30.0130.00616.50
7.4.00.0060.00815.00
7.3.330.0050.00013.38
7.3.320.0000.00613.16
7.3.310.0000.00716.26
7.3.300.0000.00716.27
7.3.290.0030.01216.30
7.3.280.0080.00916.31
7.3.270.0100.01017.40
7.3.260.0060.01116.56
7.3.250.0090.01016.43
7.3.240.0120.00816.39
7.3.230.0220.00016.44
7.3.210.0070.01016.32
7.3.200.0100.00816.27
7.3.190.0060.01016.32
7.3.180.0060.01016.50
7.3.170.0040.01516.49
7.3.160.0080.01216.52
7.3.120.0100.00614.67
7.3.110.0000.01814.96
7.3.100.0080.00414.84
7.3.90.0060.00614.85
7.3.80.0030.00815.02
7.3.70.0000.00914.93
7.3.60.0030.01014.68
7.3.50.0080.00414.88
7.3.40.0030.01014.63
7.3.30.0120.00614.71
7.3.20.0110.00316.77
7.3.10.0040.00716.71
7.3.00.0040.00816.41
7.2.330.0120.00616.80
7.2.320.0000.01816.74
7.2.310.0030.01316.65
7.2.300.0130.00416.64
7.2.290.0100.00616.69
7.2.250.0120.00415.16
7.2.240.0030.01714.50
7.2.230.0070.01015.12
7.2.220.0040.01115.21
7.2.210.0000.01415.18
7.2.200.0070.00714.93
7.2.190.0070.01014.73
7.2.180.0060.00915.17
7.2.170.0060.01015.03
7.1.330.0120.00316.05
7.1.320.0060.00915.71
7.1.310.0000.00815.97
7.1.300.0030.01015.47
7.1.290.0070.00715.74
7.1.280.0040.01515.83
7.1.270.0000.01615.78
7.1.260.0060.00315.57
7.1.70.0000.00917.20
7.1.60.0100.01619.24
7.1.50.0000.01816.96
7.1.00.0030.07322.27
7.0.200.0850.00414.90
7.0.60.0200.03719.92
7.0.50.0070.08717.87
7.0.40.0030.04320.26
7.0.30.0230.04020.33
7.0.20.0100.04720.30
7.0.10.0130.08020.33
7.0.00.0030.04320.25
5.6.280.0070.03020.93
5.6.210.0100.04020.65
5.6.200.0000.06718.14
5.6.190.0170.07320.28
5.6.180.0270.04320.55
5.6.170.0230.05720.55
5.6.160.0200.08020.48
5.6.150.0100.07718.20
5.6.140.0170.07718.18
5.6.130.0100.06018.18
5.6.120.0130.03720.99
5.6.110.0070.08021.13
5.6.100.0030.07020.97
5.6.90.0070.05020.89
5.6.80.0130.06320.32
5.5.350.0300.08020.36
5.5.340.0030.04317.95
5.5.330.0070.09020.31
5.5.320.0330.03720.36
5.5.310.0230.08020.23
5.5.300.0100.07318.04
5.5.290.0200.06018.04
5.5.280.0030.04720.77
5.5.270.0100.08320.94
5.5.260.0170.07320.65
5.5.250.0070.08020.46
5.5.240.0000.07720.29

preferences:
33.43 ms | 403 KiB | 5 Q