3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = array( '28 April 2020', '3 - 5 May 2020', '3 May - 5 June 2020', '20 Dec 2020 - 15 Jan 2021' ); foreach ($dates as $date) { preg_match('/^(\d+)\s(\w+)\s(\d+)(?:\s-\s(\d+)\s(\w+)\s(\d+))?|(\d+)\s(\w+)\s-\s(\d+)\s(\w+)\s(\d+)|(\d+)\s-\s(\d+)\s(\w+)\s(\d+)$/', $date, $matches); if (isset($matches[12])) { // dd - dd mmm yyyy format $start_date = "${matches[12]} ${matches[14]} ${matches[15]}"; $end_date = "${matches[13]} ${matches[14]} ${matches[15]}"; } elseif (isset($matches[7])) { // dd mmm - dd mmm yyyy format $start_date = "${matches[7]} ${matches[8]} ${matches[11]}"; $end_date = "${matches[9]} ${matches[10]} ${matches[11]}"; } elseif (isset($matches[4])) { // dd mmm yyyy - dd mmm yyyy format $start_date = "${matches[1]} ${matches[2]} ${matches[3]}"; $end_date = "${matches[4]} ${matches[5]} ${matches[6]}"; } elseif (isset($matches[1])) { // dd mmm yyyy format $start_date = "${matches[1]} ${matches[2]} ${matches[3]}"; $end_date = "${matches[1]} ${matches[2]} ${matches[3]}"; } else { // no match $start_date = '???'; $end_date = '???'; } echo "$start_date - $end_date\n"; }

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.3.70.0120.00917.13
8.3.60.0110.01117.00
8.3.50.0060.00916.62
8.3.40.0090.00618.96
8.3.30.0150.00019.10
8.3.20.0060.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.190.0180.00316.75
8.2.180.0100.00725.92
8.2.170.0070.00722.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.0030.00519.38
8.2.110.0040.00721.30
8.2.100.0040.00818.09
8.2.90.0000.00817.99
8.2.80.0000.00819.11
8.2.70.0040.00418.13
8.2.60.0040.00418.29
8.2.50.0050.00318.07
8.2.40.0030.00518.47
8.2.30.0040.00418.08
8.2.20.0000.00818.16
8.2.10.0000.00821.18
8.2.00.0000.00819.45
8.1.280.0170.00325.92
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.80
8.1.230.0070.00320.44
8.1.220.0080.00017.91
8.1.210.0080.00018.77
8.1.200.0040.00417.60
8.1.190.0000.00817.60
8.1.180.0030.00519.30
8.1.170.0030.00618.89
8.1.160.0000.00818.89
8.1.150.0050.00218.97
8.1.140.0040.00418.98
8.1.130.0000.00720.19
8.1.120.0030.00617.65
8.1.110.0000.00817.64
8.1.100.0050.00317.62
8.1.90.0050.00217.68
8.1.80.0040.00417.71
8.1.70.0000.00717.63
8.1.60.0040.00417.80
8.1.50.0050.00317.72
8.1.40.0050.00317.79
8.1.30.0000.00817.87
8.1.20.0050.00317.84
8.1.10.0040.00417.75
8.1.00.0000.00817.73
8.0.300.0040.00419.91
8.0.290.0000.00817.00
8.0.280.0000.00818.48
8.0.270.0040.00418.22
8.0.260.0070.00018.53
8.0.250.0030.00317.04
8.0.240.0000.00717.04
8.0.230.0040.00417.20
8.0.220.0030.00616.99
8.0.210.0000.00817.11
8.0.200.0030.00317.13
8.0.190.0000.00717.14
8.0.180.0030.00617.01
8.0.170.0000.00917.00
8.0.160.0040.00417.11
8.0.150.0000.00817.02
8.0.140.0050.00317.12
8.0.130.0060.00013.55
8.0.120.0000.00816.96
8.0.110.0040.00417.17
8.0.100.0060.00316.93
8.0.90.0000.00916.98
8.0.80.0130.00417.07
8.0.70.0040.00417.11
8.0.60.0070.00016.90
8.0.50.0040.00417.08
8.0.30.0000.01717.03
8.0.20.0120.00817.61
8.0.10.0080.00017.27
8.0.00.0120.00617.17
7.4.330.0000.00515.55
7.4.320.0060.00016.77
7.4.300.0060.00016.79
7.4.290.0030.00316.78
7.4.280.0040.00416.86
7.4.270.0030.00316.79
7.4.260.0060.00013.57
7.4.250.0040.00416.90
7.4.240.0020.00616.85
7.4.230.0040.00416.76
7.4.220.0030.00316.91
7.4.210.0110.00716.86
7.4.200.0000.00716.86
7.4.130.0100.01116.74
7.4.120.0170.01216.86
7.4.110.0030.01416.83
7.4.100.0100.00617.00
7.4.90.0070.01516.80
7.4.80.0130.00919.39
7.4.70.0140.00716.76
7.4.60.0100.00716.78
7.4.50.0050.01116.27
7.4.40.0120.00416.20
7.4.30.0030.01416.59
7.4.20.0100.00716.57
7.4.10.0120.00616.45
7.4.00.0110.00516.63
7.3.330.0000.00716.38
7.3.320.0060.00013.31
7.3.310.0050.00216.53
7.3.300.0000.00716.52
7.3.290.0070.00016.56
7.3.280.0060.00916.55
7.3.260.0240.00016.73
7.3.240.0080.00916.57
7.3.230.0130.00616.83
7.3.210.0070.01016.48
7.3.200.0090.01316.71
7.3.190.0120.00916.61
7.3.180.0110.00516.77
7.3.170.0040.01216.52
7.3.160.0040.01116.59
7.3.150.0100.00616.50
7.3.140.0080.00816.46
7.3.130.0120.00616.45
7.3.120.0060.01116.50
7.3.110.0090.00916.67
7.3.100.0110.00816.57
7.3.90.0130.00316.75
7.3.80.0070.01016.73
7.3.70.0090.00916.59
7.3.60.0100.00816.56
7.3.50.0090.00916.70
7.3.40.0060.01216.36
7.3.30.0000.01616.59
7.3.20.0100.01016.62
7.3.10.0140.00616.61
7.3.00.0070.01016.63
7.2.330.0130.00716.82
7.2.320.0030.01516.89
7.2.310.0060.01216.94
7.2.300.0100.00716.73
7.2.290.0130.00316.81
7.2.280.0070.01016.87
7.2.270.0140.00316.84
7.2.260.0060.01216.73
7.2.250.0080.01017.02
7.2.240.0060.01216.70
7.2.230.0000.01916.86
7.2.220.0150.00316.64
7.2.210.0110.00816.73
7.2.200.0100.00816.61
7.2.190.0130.00516.87
7.2.180.0110.00616.89
7.2.170.0060.01316.66
7.2.160.0050.01116.71
7.2.150.0110.00716.93
7.2.140.0120.01017.07
7.2.130.0040.01616.85
7.2.120.0060.01216.99
7.2.110.0110.00716.86
7.2.100.0090.00916.73
7.2.90.0000.01916.75
7.2.80.0120.00916.91
7.2.70.0090.01516.90
7.2.60.0160.00616.93
7.2.50.0130.01216.84
7.2.40.0120.01516.91
7.2.30.0130.01316.88
7.2.20.0030.02216.91
7.2.10.0110.01516.73
7.2.00.0030.01416.77

preferences:
48 ms | 401 KiB | 5 Q