3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lookup = array_flip(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']); $months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Sep', 'Oct', 'Dec']; $result = []; foreach ($months as $month) { if (isset($ref) && $lookup[$month] === $lookup[$last] + 1) { $ref = strtok($ref, "-") . "-$month"; } else { unset($ref); $ref = $month; $result[] = &$ref; } $last = $month; } var_export($result);

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.0160.01217.57
8.4.130.0090.01117.64
8.4.120.0070.00420.74
8.4.110.0130.00720.25
8.4.100.0110.01017.81
8.4.90.0070.00419.45
8.4.80.0070.00517.91
8.4.70.0040.00717.72
8.4.60.0140.00620.32
8.4.50.0130.00817.47
8.4.40.0050.00320.76
8.4.30.0070.01318.73
8.4.20.0130.00622.35
8.4.10.0090.00023.98
8.3.270.0120.00616.71
8.3.260.0140.00516.61
8.3.250.0090.00819.16
8.3.240.0140.00516.52
8.3.230.0090.00916.32
8.3.220.0110.00617.24
8.3.210.0100.00816.50
8.3.200.0050.00416.82
8.3.190.0130.00516.55
8.3.180.0140.01016.70
8.3.170.0140.00419.06
8.3.160.0150.00418.30
8.3.150.0060.01219.19
8.3.140.0080.00017.14
8.3.130.0040.00418.51
8.3.120.0030.00620.75
8.3.110.0000.00816.60
8.3.100.0050.00516.61
8.3.90.0140.00026.77
8.3.80.0060.00318.30
8.3.70.0200.00016.58
8.3.60.0120.00918.43
8.3.50.0110.00716.48
8.3.40.0120.00319.84
8.3.30.0070.00718.69
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00918.90
8.2.280.0100.00820.51
8.2.270.0030.00616.76
8.2.260.0100.01020.46
8.2.250.0080.00016.99
8.2.240.0040.00419.05
8.2.230.0060.00322.58
8.2.220.0040.01524.06
8.2.210.0140.00426.77
8.2.200.0060.00316.38
8.2.190.0150.00616.58
8.2.180.0140.00025.92
8.2.170.0110.00718.91
8.2.160.0030.01022.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00721.00
8.2.110.0090.00020.54
8.2.100.0080.00417.91
8.2.90.0040.00417.88
8.2.80.0030.00518.73
8.2.70.0030.00517.50
8.2.60.0040.00417.63
8.2.50.0180.00019.52
8.2.40.0110.00919.52
8.2.30.0060.01219.52
8.2.20.0160.00219.52
8.2.10.0140.00619.52
8.2.00.0120.00619.52
8.1.330.0150.00516.17
8.1.320.0100.00916.19
8.1.310.0110.00416.89
8.1.300.0090.00620.27
8.1.290.0060.00330.84
8.1.280.0110.00625.92
8.1.270.0050.00323.82
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.46
8.1.230.0060.00620.89
8.1.220.0000.00817.79
8.1.210.0000.00918.77
8.1.200.0080.00317.22
8.1.190.0060.00317.22
8.1.180.0100.00719.52
8.1.170.0160.00019.52
8.1.160.0120.00419.52
8.1.150.0120.00419.52
8.1.140.0080.00819.52
8.1.130.0070.01019.52
8.1.120.0090.00919.52
8.1.110.0180.00019.52
8.1.100.0100.00719.52
8.1.90.0120.00319.52
8.1.80.0000.01519.52
8.1.70.0080.00819.52
8.1.60.0120.00619.52
8.1.50.0120.00619.52
8.1.40.0170.00019.52
8.1.30.0140.00319.52
8.1.20.0150.00419.52
8.1.10.0110.00719.52
8.1.00.0090.00919.52
8.0.300.0070.00019.60
8.0.290.0040.00416.63
8.0.280.0160.00019.52
8.0.270.0100.00619.52
8.0.260.0120.00619.52
8.0.250.0080.00819.52
8.0.240.0090.00619.52
8.0.230.0170.00019.52
8.0.220.0110.00619.52
8.0.210.0180.00019.52
8.0.200.0050.01119.52
8.0.190.0170.00019.52
8.0.180.0120.00419.52
8.0.170.0080.00819.52
8.0.160.0080.00819.52
8.0.150.0080.00819.52
8.0.140.0110.00719.52
8.0.130.0120.00419.52
8.0.120.0170.00019.52
8.0.110.0110.00519.52
8.0.100.0160.00019.52
8.0.90.0130.00319.52
8.0.80.0000.01619.52
8.0.70.0160.00019.52
8.0.60.0090.00919.52
8.0.50.0150.00019.52
8.0.30.0120.00519.52
8.0.20.0120.00419.52
8.0.10.0110.00619.52

preferences:
37.64 ms | 403 KiB | 5 Q