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', 'Jan', 'Feb']; $result = []; foreach ($months as $month) { if (isset($ref) && $lookup[$month] === ($lookup[$last] + 1) % 12) { $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.0140.00817.36
8.4.130.0140.00617.85
8.4.120.0110.00820.74
8.4.110.0130.00822.65
8.4.100.0090.01117.71
8.4.90.0110.01018.85
8.4.80.0100.00919.63
8.4.70.0110.00917.86
8.4.60.0100.00418.80
8.4.50.0100.00719.42
8.4.40.0090.00620.46
8.4.30.0200.00018.50
8.4.20.0080.01222.54
8.4.10.0100.01023.70
8.3.270.0130.00816.64
8.3.260.0130.00616.59
8.3.250.0070.00318.92
8.3.240.0090.01016.46
8.3.230.0120.00616.87
8.3.220.0120.00617.13
8.3.210.0040.00316.55
8.3.200.0060.00316.63
8.3.190.0120.00619.08
8.3.180.0120.00716.59
8.3.170.0130.00619.22
8.3.160.0100.00716.60
8.3.150.0060.01220.44
8.3.140.0100.00617.13
8.3.130.0080.00016.40
8.3.120.0110.00720.56
8.3.110.0110.00816.55
8.3.100.0060.00316.74
8.3.90.0080.01126.77
8.3.80.0060.00317.97
8.3.70.0110.00416.75
8.3.60.0130.01018.45
8.3.50.0070.00718.38
8.3.40.0060.00919.96
8.3.30.0100.01018.76
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0140.00420.29
8.2.280.0050.00418.19
8.2.270.0110.00717.47
8.2.260.0060.01020.57
8.2.250.0040.00418.21
8.2.240.0040.01117.11
8.2.230.0040.00420.94
8.2.220.0040.01224.06
8.2.210.0150.00626.77
8.2.200.0060.00316.50
8.2.190.0170.00016.58
8.2.180.0140.00316.50
8.2.170.0090.00622.96
8.2.160.0030.01622.96
8.2.150.0080.00025.66
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0030.00620.47
8.2.100.0060.00617.72
8.2.90.0040.00417.88
8.2.80.0040.00418.82
8.2.70.0030.00518.03
8.2.60.0000.00717.63
8.2.50.0150.00219.52
8.2.40.0060.01219.52
8.2.30.0140.00519.52
8.2.20.0060.01119.52
8.2.10.0140.00519.52
8.2.00.0110.01119.52
8.1.330.0090.00922.07
8.1.320.0110.00816.04
8.1.310.0050.00316.55
8.1.300.0040.00716.60
8.1.290.0060.00330.84
8.1.280.0150.00625.92
8.1.270.0000.00824.66
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00322.20
8.1.230.0060.00623.89
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0000.00917.23
8.1.180.0100.00619.52
8.1.170.0130.00319.52
8.1.160.0120.00419.52
8.1.150.0120.00619.52
8.1.140.0060.01019.52
8.1.130.0150.00319.52
8.1.120.0000.01719.52
8.1.110.0080.00819.52
8.1.100.0110.00619.52
8.1.90.0120.00419.52
8.1.80.0140.00719.52
8.1.70.0110.00419.52
8.1.60.0150.00319.52
8.1.50.0100.00719.52
8.1.40.0170.00019.52
8.1.30.0180.00019.52
8.1.20.0140.00519.52
8.1.10.0130.00519.52
8.1.00.0160.00319.52
8.0.300.0070.00018.77
8.0.290.0050.00216.75
8.0.280.0110.00619.52
8.0.270.0170.00019.52
8.0.260.0100.00719.52
8.0.250.0130.00319.52
8.0.240.0080.00819.52
8.0.230.0080.00819.52
8.0.220.0140.00219.52
8.0.210.0120.00619.52
8.0.200.0170.00019.52
8.0.190.0140.00319.52
8.0.180.0090.00919.52
8.0.170.0120.00619.52
8.0.160.0090.00919.52
8.0.150.0120.00519.52
8.0.140.0090.00919.52
8.0.130.0090.00919.52
8.0.120.0110.00619.52
8.0.110.0160.00019.52
8.0.100.0110.00619.52
8.0.90.0150.00319.52
8.0.80.0130.00419.52
8.0.70.0180.00019.52
8.0.60.0150.00219.52
8.0.50.0160.00019.52
8.0.30.0150.00219.52
8.0.20.0130.00319.52
8.0.10.0140.00419.52

preferences:
29.21 ms | 403 KiB | 5 Q