3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "Jan 12 02:08:23 hello", "Dec 23 21:37:56 hello", //"Jan 12 02:08:23 hello", //"Jan 16 17:34:33 hello", "Feb 4 12:21:09 hello", "Mar 19 17:07:26 hello", "Apr 1 00:00:03 hello", "Nov 10 11:00:03 hello", "Apr 12 23:07:39 hello", "May 21 04:09:34 hello", "Jun 7 23:34:56 hello", "Sep 29 07:36:03 hello", "Jul 1 14:45:34 hello", "Aug 13 11:37:23 hello", "Sep 29 07:36:03 hello", "Oct 30 09:01:00 hello", "Nov 10 11:00:03 hello", "Dec 25 21:47:51 hello" ]; var_export( preg_replace_callback( '/^([a-z]{3}) +\d+/i', function($m) { static $lastMonthInt = 0; static $year = null; $year ??= date('Y', strtotime('-1 year')); $currentMonthInt = date('n', strtotime($m[1])); if ($currentMonthInt < $lastMonthInt) { ++$year; } $lastMonthInt = $currentMonthInt; return "$year " . date('m d', strtotime($m[0])); }, $arr ) );

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.120.0100.01120.05
8.4.110.0090.00823.80
8.4.100.0050.00618.40
8.4.90.0130.00720.39
8.4.80.0110.00818.83
8.4.70.0110.00819.06
8.4.60.0090.01220.52
8.4.50.0070.00318.95
8.4.40.0000.00820.66
8.4.30.0030.01520.70
8.4.20.0140.00719.93
8.4.10.0000.00922.16
8.3.250.0120.00816.92
8.3.240.0120.00517.10
8.3.230.0130.00716.86
8.3.220.0050.00419.22
8.3.210.0120.00818.81
8.3.200.0070.00516.89
8.3.190.0090.00917.31
8.3.180.0060.00417.08
8.3.170.0070.01117.34
8.3.160.0100.00517.06
8.3.150.0110.00720.63
8.3.140.0120.00617.30
8.3.130.0060.00318.59
8.3.120.0070.01119.25
8.3.110.0060.00320.94
8.3.100.0040.00717.21
8.3.90.0050.00326.77
8.3.80.0000.00917.97
8.3.70.0090.00616.88
8.3.60.0120.00318.66
8.3.50.0110.01118.59
8.3.40.0000.01420.34
8.3.30.0040.01118.97
8.3.20.0000.00824.18
8.3.10.0060.00324.66
8.3.00.0000.00726.16
8.2.290.0050.00317.09
8.2.280.0110.00920.39
8.2.270.0130.00317.20
8.2.260.0030.00616.91
8.2.250.0040.00420.71
8.2.240.0060.00317.38
8.2.230.0090.00022.58
8.2.220.0090.00037.54
8.2.210.0160.00026.77
8.2.200.0030.00618.92
8.2.190.0120.00316.98
8.2.180.0070.01417.00
8.2.170.0070.01019.15
8.2.160.0040.01122.96
8.2.150.0030.00625.66
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0000.01019.39
8.2.100.0070.00718.16
8.2.90.0090.00019.52
8.2.80.0030.00519.26
8.2.70.0000.00818.13
8.2.60.0000.00818.17
8.2.50.0000.00818.13
8.2.40.0030.00620.31
8.2.30.0030.00618.38
8.2.20.0090.00418.15
8.2.10.0130.00318.04
8.2.00.0090.00718.20
8.1.330.0140.00516.72
8.1.320.0120.00716.67
8.1.310.0000.01720.35
8.1.300.0100.01018.65
8.1.290.0030.00630.84
8.1.280.0070.01725.92
8.1.270.0060.00322.35
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00022.26
8.1.230.0040.00820.97
8.1.220.0090.00018.16
8.1.210.0000.00818.91
8.1.200.0060.00317.85
8.1.190.0000.00917.85
8.1.180.0030.00618.10
8.1.170.0090.00019.04
8.1.160.0040.00418.98
8.1.150.0120.00317.86
8.1.140.0130.00217.82
8.1.130.0120.00417.86
8.1.120.0120.00317.94
8.1.110.0120.00317.94
8.1.100.0080.00817.86
8.1.90.0110.00417.97
8.1.80.0160.00017.95
8.1.70.0130.00317.95
8.1.60.0130.00417.88
8.1.50.0150.00217.99
8.1.40.0090.00618.04
8.1.30.0070.00217.95
8.1.20.0040.00417.93
8.1.10.0120.00518.01
8.1.00.0110.00217.91
8.0.300.0050.00220.22
8.0.290.0040.00417.13
8.0.280.0030.00318.48
8.0.270.0070.00717.23
8.0.260.0050.00717.21
8.0.250.0050.00817.28
8.0.240.0050.00717.27
8.0.230.0110.00017.28
8.0.220.0090.00317.10
8.0.210.0060.00617.19
8.0.200.0090.00417.21
8.0.190.0080.00617.14
8.0.180.0130.00317.12
8.0.170.0130.00017.35
8.0.160.0080.00417.20
8.0.150.0080.00417.18
8.0.140.0110.00017.14
8.0.130.0040.00917.13
8.0.120.0090.00317.06
8.0.110.0050.00717.13
8.0.100.0070.00717.11
8.0.90.0080.00517.21
8.0.80.0000.01017.20
8.0.70.0050.00517.20
8.0.60.0050.00517.29
8.0.50.0080.00317.29
8.0.30.0130.00017.15
8.0.20.0110.00417.29
8.0.10.0120.00517.35

preferences:
26.85 ms | 403 KiB | 5 Q