3v4l.org

run code in 500+ PHP versions simultaneously
<?php function chunkOverloadLast(array $array, int $size) { $result = array_chunk($array, $size); if (count($array) % $size) { $result[] = array_merge(...array_splice($result, -2)); } return $result; } $languages = ['php', 'mysql', 'java', 'nodejs', 'ruby', 'go', 'c#']; echo json_encode(chunkOverloadLast($languages, 2));

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.30.0110.00718.23
8.5.20.0090.00818.54
8.5.10.0100.00716.79
8.5.00.0090.00918.49
8.4.180.0110.01019.65
8.4.170.0110.01020.78
8.4.160.0130.00720.79
8.4.150.0070.00517.79
8.4.140.0110.00917.66
8.4.130.0080.00718.21
8.4.120.0120.00720.90
8.4.110.0130.00820.02
8.4.100.0130.00718.16
8.4.90.0100.01018.32
8.4.80.0070.00618.44
8.4.70.0090.01117.86
8.4.60.0130.00718.21
8.4.50.0090.01118.33
8.4.40.0110.00917.65
8.4.30.0110.00919.13
8.4.20.0120.00517.71
8.4.10.0130.00718.61
8.3.300.0110.01018.35
8.3.290.0130.00819.44
8.3.280.0140.00718.50
8.3.270.0110.00616.88
8.3.260.0080.00916.81
8.3.250.0080.00417.87
8.3.240.0090.00917.05
8.3.230.0060.00516.77
8.3.220.0100.00717.95
8.3.210.0080.00616.78
8.3.200.0130.00516.66
8.3.190.0110.00717.03
8.3.180.0110.00817.05
8.3.170.0110.00617.95
8.3.160.0090.01016.97
8.3.150.0080.01017.07
8.3.140.0130.00416.73
8.3.130.0070.00716.88
8.3.120.0060.00718.75
8.3.110.0060.00618.92
8.3.100.0120.00717.58
8.3.90.0080.01016.88
8.3.80.0090.00517.61
8.3.70.0150.01017.78
8.3.60.0230.00516.68
8.3.50.0130.00717.40
8.3.40.0170.00819.17
8.3.30.0210.00619.44
8.3.20.0150.01219.37
8.3.10.0200.00819.50
8.3.00.0140.01019.41
8.2.300.0120.00919.16
8.2.290.0100.00618.83
8.2.280.0150.00717.71
8.2.270.0150.00517.09
8.2.260.0130.00716.73
8.2.250.0070.00816.68
8.2.240.0080.00818.01
8.2.230.0110.00919.74
8.2.220.0080.00820.48
8.2.210.0110.00921.83
8.2.200.0100.00517.60
8.2.190.0170.00816.74
8.2.180.0140.00716.74
8.2.170.0190.00619.61
8.2.160.0210.00519.44
8.2.150.0160.00819.43
8.2.140.0140.00819.47
8.2.130.0170.00719.24
8.2.120.0190.00519.45
8.2.110.0170.00719.54
8.2.100.0160.00719.48
8.2.90.0150.00719.45
8.2.80.0170.00619.47
8.2.70.0160.00819.48
8.2.60.0180.00619.41
8.2.50.0170.00619.47
8.2.40.0160.00419.48
8.2.30.0180.00419.41
8.2.20.0150.00719.40
8.2.10.0150.00919.41
8.2.00.0140.00919.36
8.1.340.0120.01019.06
8.1.330.0120.00819.35
8.1.320.0120.00816.48
8.1.310.0140.00617.64
8.1.300.0130.00917.72
8.1.290.0090.00717.89
8.1.280.0180.00819.80
8.1.270.0190.00919.55
8.1.260.0230.00619.30
8.1.250.0250.00719.17
8.1.240.0190.00719.20
8.1.230.0190.01019.27
8.1.220.0210.00719.22
8.1.210.0250.00419.20
8.1.200.0210.00819.33
8.1.190.0190.00819.24
8.1.180.0190.01119.21
8.1.170.0170.01119.31
8.1.160.0220.00419.27
8.1.150.0160.01019.31
8.1.140.0180.00719.24
8.1.130.0170.00619.33
8.1.120.0150.01019.32
8.1.110.0150.01119.29
8.1.100.0220.00519.34
8.1.90.0140.00819.40
8.1.80.0180.00619.31
8.1.70.0160.00519.28
8.1.60.0150.00619.49
8.1.50.0160.00919.39
8.1.40.0170.00519.31
8.1.30.0140.00619.33
8.1.20.0140.00719.47
8.1.10.0140.00819.30
8.1.00.0140.00519.31

preferences:
43.55 ms | 977 KiB | 5 Q