3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ // without first Dec, Jan and Jan lines: // all subsequent lines are the current year "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", "Apr 12 23:07:39 hello", "May 21 04:09:34 hello", "Jun 7 23:34:56 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( array_reverse( preg_replace_callback( '/^[a-z]{3} +\d+ \d\d:\d\d:\d\d/i', function($m) { static $lastStamp = null; static $year = null; $year ??= date('Y'); $currentStamp = date('m d H:i:s', strtotime($m[0])); if ($currentStamp > ($lastStamp ?? $currentStamp)) { --$year; } $lastStamp = $currentStamp; return "$year $currentStamp"; }, array_reverse($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.0110.00822.13
8.4.110.0040.00522.49
8.4.100.0110.01118.05
8.4.90.0130.00818.92
8.4.80.0100.01018.30
8.4.70.0030.00620.26
8.4.60.0140.00818.64
8.4.50.0080.00918.25
8.4.40.0160.00320.80
8.4.30.0100.01018.96
8.4.20.0060.00920.02
8.4.10.0060.00322.20
8.3.250.0120.00718.95
8.3.240.0130.00717.01
8.3.230.0040.00516.67
8.3.220.0090.01017.32
8.3.210.0080.00717.04
8.3.200.0050.00616.78
8.3.190.0130.00417.28
8.3.180.0110.00818.63
8.3.170.0070.01119.13
8.3.160.0080.01117.16
8.3.150.0090.00919.15
8.3.140.0030.01317.34
8.3.130.0030.00518.94
8.3.120.0130.00719.03
8.3.110.0040.00420.94
8.3.100.0080.00017.11
8.3.90.0110.00426.77
8.3.80.0030.01018.68
8.3.70.0110.00716.75
8.3.60.0150.00618.80
8.3.50.0060.00918.47
8.3.40.0150.00020.09
8.3.30.0120.00319.23
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0030.00526.16
8.2.290.0110.00920.82
8.2.280.0070.00820.34
8.2.270.0070.01316.88
8.2.260.0040.00420.76
8.2.250.0150.00019.16
8.2.240.0030.00617.62
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0000.00826.77
8.2.200.0040.00716.75
8.2.190.0090.00616.88
8.2.180.0090.00916.75
8.2.170.0150.00022.96
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00919.89
8.2.110.0060.00322.25
8.2.100.0060.00618.16
8.2.90.0030.00518.00
8.2.80.0040.00718.98
8.2.70.0080.00418.13
8.2.60.0060.00318.05
8.2.50.0000.00818.07
8.2.40.0030.00518.47
8.2.30.0040.00418.26
8.2.20.0110.00518.10
8.2.10.0080.00918.16
8.2.00.0110.00518.09
8.1.330.0130.00620.23
8.1.320.0120.00616.51
8.1.310.0070.01016.89
8.1.300.0070.01018.45
8.1.290.0090.00030.84
8.1.280.0110.00425.92
8.1.270.0080.00024.66
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0050.00520.69
8.1.230.0080.00417.70
8.1.220.0040.00417.79
8.1.210.0030.00618.77
8.1.200.0100.00017.72
8.1.190.0070.00317.61
8.1.180.0030.00618.10
8.1.170.0040.00418.82
8.1.160.0040.00419.05
8.1.150.0110.00517.69
8.1.140.0110.00617.82
8.1.130.0130.00317.91
8.1.120.0110.00417.88
8.1.110.0100.00517.80
8.1.100.0100.00617.94
8.1.90.0140.00217.92
8.1.80.0040.01317.91
8.1.70.0100.00717.87
8.1.60.0160.00417.85
8.1.50.0160.00417.77
8.1.40.0140.00417.97
8.1.30.0200.00017.92
8.1.20.0160.00417.96
8.1.10.0070.00717.93
8.1.00.0060.00317.89
8.0.300.0040.00418.77
8.0.290.0030.00516.88
8.0.280.0030.00318.44
8.0.270.0070.00017.13
8.0.260.0030.00617.17
8.0.250.0000.01117.11
8.0.240.0030.00717.16
8.0.230.0100.00317.14
8.0.220.0050.00517.06
8.0.210.0070.00417.16
8.0.200.0030.00717.00
8.0.190.0050.00517.04
8.0.180.0000.01117.19
8.0.170.0080.00417.12
8.0.160.0070.00217.23
8.0.150.0100.00017.20
8.0.140.0050.00517.10
8.0.130.0080.00017.14
8.0.120.0040.00717.04
8.0.110.0080.00217.21
8.0.100.0140.00017.08
8.0.90.0080.00617.17
8.0.80.0130.00017.15
8.0.70.0080.00817.10
8.0.60.0050.01017.05
8.0.50.0070.00717.11
8.0.30.0170.00317.22
8.0.20.0160.00417.21
8.0.10.0110.01117.27

preferences:
69.35 ms | 403 KiB | 5 Q