3v4l.org

run code in 300+ PHP versions simultaneously
<?php function standard_date_format($str) { preg_match_all('/(\d{1,2}) (\w+) (\d{4})/', $str, $matches); $dates = array_map("strtotime", $matches[0]); $result = array_map(function($v) {return date("Y-m-d", $v); }, $dates); return $result; } $str1 = "Company registered on 16 March 2003"; $str2 = "Activity between 10 May 2006 an 10 July 2008 - no changes."; print_r(standard_date_format($str1)); print_r(standard_date_format($str2));

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.20.0100.01018.12
8.4.10.0030.01318.11
8.3.150.0130.01020.80
8.3.140.0040.00416.82
8.3.130.0030.00618.86
8.3.120.0040.00419.17
8.3.110.0030.01320.94
8.3.100.0040.00424.06
8.3.90.0110.00726.77
8.3.80.0040.00818.55
8.3.70.0090.00617.13
8.3.60.0120.00316.86
8.3.50.0120.01021.33
8.3.40.0120.00319.03
8.3.30.0060.01619.09
8.3.20.0090.00521.92
8.3.10.0030.01022.63
8.3.00.0050.00920.98
8.2.260.0030.00520.70
8.2.250.0030.00816.98
8.2.240.0100.00017.54
8.2.230.0090.00022.58
8.2.220.0030.00637.54
8.2.210.0070.00726.77
8.2.200.0060.01216.88
8.2.190.0060.00918.54
8.2.180.0120.00317.13
8.2.170.0070.00722.96
8.2.160.0050.01019.22
8.2.150.0080.00622.67
8.2.140.0070.00723.55
8.2.130.0110.00224.27
8.2.120.0090.00520.43
8.2.110.0030.01120.92
8.2.100.0180.00519.26
8.2.90.0140.00519.12
8.2.80.0150.00519.60
8.2.70.0150.00419.11
8.2.60.0140.00819.15
8.2.50.0160.00519.22
8.2.40.0160.00319.88
8.2.30.0140.00520.01
8.2.20.0130.00519.12
8.2.10.0090.00819.19
8.2.00.0120.00719.23
8.1.310.0080.00016.87
8.1.300.0160.00420.32
8.1.290.0100.00030.84
8.1.280.0070.00725.92
8.1.270.0050.00623.94
8.1.260.0050.00625.10
8.1.250.0050.00725.98
8.1.240.0080.00622.26
8.1.230.0130.00720.33
8.1.220.0150.00319.32
8.1.210.0140.00519.21
8.1.200.0120.00718.99
8.1.190.0130.00718.88
8.1.180.0090.00818.99
8.1.170.0120.00618.90
8.1.160.0110.00820.38
8.1.150.0100.00719.35
8.1.140.0130.00519.57
8.1.130.0160.00318.88
8.1.120.0120.00718.90
8.1.110.0110.00818.96
8.1.100.0150.00418.95
8.1.90.0130.00618.96
8.1.80.0150.00519.34
8.1.70.0120.00618.93
8.1.60.0100.00718.96
8.1.50.0130.00418.96
8.1.40.0090.00619.01
8.1.30.0120.00619.02
8.1.20.0090.00819.40
8.1.10.0090.00718.95
8.1.00.0140.00119.03
8.0.300.0100.00519.08
8.0.290.0150.00417.87
8.0.280.0180.00218.31
8.0.270.0160.00118.54
8.0.260.0180.00117.97
8.0.250.0140.00617.89
8.0.240.0140.00717.96
8.0.230.0200.00217.94
8.0.220.0100.00717.93
8.0.210.0170.00717.94
8.0.200.0170.00718.00
8.0.190.0150.01017.90
8.0.180.0130.00418.59
8.0.170.0190.00617.91
8.0.160.0130.00718.55
8.0.150.0180.00417.92
8.0.140.0190.00617.95
8.0.130.0180.00316.75
8.0.120.0170.00617.93
8.0.110.0090.00818.52
8.0.100.0180.00217.95
8.0.90.0180.00417.90
8.0.80.0160.00717.96
8.0.70.0130.00718.47
8.0.60.0190.00617.95
8.0.50.0170.00717.99
8.0.30.0140.00818.31
8.0.20.0140.01018.21
8.0.10.0180.00418.05
8.0.00.0130.01018.13
7.4.330.0090.00416.18
7.4.320.0160.00517.77
7.4.300.0190.00617.74
7.4.290.0180.00717.73
7.4.280.0200.00517.62
7.4.270.0220.00417.68
7.4.260.0210.00417.72
7.4.250.0190.00417.60
7.4.240.0200.00217.67
7.4.230.0170.00517.69
7.4.220.0180.00717.75
7.4.210.0220.00517.45
7.4.200.0180.00317.75
7.4.190.0220.00618.13
7.4.180.0220.00618.08
7.4.160.0200.00818.08
7.4.150.0180.00617.95
7.4.140.0220.00317.97
7.4.130.0180.00617.36
7.4.120.0170.00817.45
7.4.110.0170.00817.51
7.4.100.0170.00917.51
7.4.90.0240.00917.48
7.4.80.0180.01018.04
7.4.70.0170.01117.46
7.4.60.0230.00417.38
7.4.50.0170.00917.44
7.4.40.0170.00817.44
7.4.30.0150.01017.43
7.4.20.0250.00617.70
7.4.10.0200.00717.76
7.4.00.0160.00816.94
7.3.330.0150.00516.47
7.3.320.0180.00416.49
7.3.310.0190.00317.54
7.3.300.0180.00517.66
7.3.290.0140.01117.50
7.3.280.0170.00517.11
7.3.270.0200.00817.75
7.3.260.0130.01117.59
7.3.250.0170.00817.09
7.3.240.0180.00717.31
7.3.230.0210.00617.33
7.3.220.0210.01017.49
7.3.210.0150.01317.38
7.3.200.0160.01017.31
7.3.190.0230.00517.39
7.3.180.0170.01017.34
7.3.170.0210.00917.52
7.3.160.0180.00817.33
7.3.150.0180.01117.53
7.3.140.0260.00417.59
7.3.130.0250.00517.52
7.3.120.0180.01017.47
7.3.110.0210.00717.63
7.3.100.0230.00517.46
7.3.90.0190.00917.62
7.3.80.0200.01117.63
7.3.70.0240.00617.53
7.3.60.0210.00717.63
7.3.50.0250.00417.58
7.3.40.0240.00717.61
7.3.30.0250.00517.61
7.3.20.0200.01018.25
7.3.10.0160.00817.71
7.3.00.0160.01017.63
7.2.340.0300.00617.70
7.2.330.0220.01117.43
7.2.320.0230.01017.45
7.2.310.0250.00817.47
7.2.300.0230.00817.55
7.2.290.0200.00917.56
7.2.280.0280.00617.65
7.2.270.0280.00617.76
7.2.260.0240.01017.77
7.2.250.0210.01017.82
7.2.240.0290.00817.68
7.2.230.0240.01117.64
7.2.220.0200.01317.78
7.2.210.0270.00817.66
7.2.200.0270.00817.63
7.2.190.0280.00917.77
7.2.180.0260.00817.79
7.2.170.0270.00817.68
7.2.160.0260.01017.83
7.2.150.0280.00818.39
7.2.140.0270.00918.20
7.2.130.0190.00917.92
7.2.120.0190.01017.90
7.2.110.0220.00517.90
7.2.100.0170.00717.95
7.2.90.0180.00917.90
7.2.80.0200.00717.91
7.2.70.0200.00717.93
7.2.60.0160.00817.69
7.2.50.0160.01017.92
7.2.40.0180.00917.96
7.2.30.0200.00817.93
7.2.20.0190.00917.93
7.2.10.0180.00817.86
7.2.00.0160.00718.17
7.1.330.0190.01017.61
7.1.320.0230.00717.67
7.1.310.0220.00917.59
7.1.300.0270.00617.63
7.1.290.0310.00717.60
7.1.280.0230.00917.62
7.1.270.0270.00517.92
7.1.260.0240.00917.59
7.1.250.0130.01217.00
7.1.240.0250.00917.64
7.1.230.0230.01117.65
7.1.220.0260.00717.68
7.1.210.0250.00817.68
7.1.200.0320.00717.29
7.1.190.0270.00817.61
7.1.180.0250.00717.55
7.1.170.0270.00617.48
7.1.160.0240.00817.50
7.1.150.0170.01017.65
7.1.140.0240.00817.65
7.1.130.0220.00617.67
7.1.120.0300.00317.64
7.1.110.0270.00417.69
7.1.100.0210.00817.95
7.1.90.0190.01017.66
7.1.80.0240.00617.76
7.1.70.0190.00617.57
7.1.60.0230.00618.21
7.1.50.0200.01017.72
7.1.40.0230.00617.69
7.1.30.0260.00817.69
7.1.20.0240.00717.61
7.1.10.0230.00917.57
7.1.00.0140.02618.85
7.0.330.0200.00917.43
7.0.320.0210.00817.45
7.0.310.0240.00617.33
7.0.300.0260.00517.29
7.0.290.0220.00817.34
7.0.280.0220.00717.35
7.0.270.0270.00417.37
7.0.260.0360.00717.43
7.0.250.0270.00617.32
7.0.240.0210.00917.39
7.0.230.0200.00717.44
7.0.220.0180.01117.32
7.0.210.0210.00917.31
7.0.200.0220.00816.80
7.0.190.0250.00417.39
7.0.180.0240.00417.38
7.0.170.0200.00817.24
7.0.160.0200.00617.46
7.0.150.0370.00517.21
7.0.140.0220.00617.27
7.0.130.0180.01117.24
7.0.120.0210.00817.32
7.0.110.0160.00917.82
7.0.100.0140.02817.94
7.0.90.0140.02618.08
7.0.80.0180.01917.97
7.0.70.0200.02317.89
7.0.60.0150.02517.95
7.0.50.0180.02618.01
7.0.40.0150.02617.99
7.0.30.0150.02217.94
7.0.20.0170.02817.90
7.0.10.0230.02318.03
7.0.00.0190.02517.98
5.6.400.0170.01217.03
5.6.390.0210.00917.09
5.6.380.0200.01017.20
5.6.370.0220.00917.24
5.6.360.0200.01117.06
5.6.350.0230.00717.18
5.6.340.0240.00717.25
5.6.330.0240.00717.11
5.6.320.0230.00717.11
5.6.310.0170.01217.18
5.6.300.0240.00517.14
5.6.290.0230.00617.16
5.6.280.0170.02318.16
5.6.270.0200.00717.18
5.6.260.0160.01117.17
5.6.250.0170.02518.03
5.6.240.0180.02617.98
5.6.230.0180.02417.99
5.6.220.0180.01918.10
5.6.210.0190.02618.09
5.6.200.0160.02818.15
5.6.190.0150.02018.21
5.6.180.0150.02218.13
5.6.170.0130.02918.21
5.6.160.0160.01918.16
5.6.150.0190.01518.26
5.6.140.0220.02218.21
5.6.130.0200.01918.19
5.6.120.0190.02918.23
5.6.110.0200.02718.20
5.6.100.0180.02918.19
5.6.90.0160.02318.12
5.6.80.0190.02518.00
5.6.70.0170.02418.06
5.6.60.0200.01718.10
5.6.50.0180.02118.07
5.6.40.0220.01817.94
5.6.30.0180.02517.94
5.6.20.0200.01417.99
5.6.10.0210.01318.02
5.6.00.0170.03017.94
5.5.380.0140.02817.96
5.5.370.0190.02017.99
5.5.360.0170.01817.91
5.5.350.0210.02017.92
5.5.340.0170.02618.06
5.5.330.0200.02518.08
5.5.320.0240.02218.00
5.5.310.0200.02518.09
5.5.300.0190.02418.00
5.5.290.0200.02818.07
5.5.280.0160.02318.09
5.5.270.0160.02918.01
5.5.260.0220.02417.95
5.5.250.0200.02718.00
5.5.240.0180.02617.86
5.5.230.0230.01717.95
5.5.220.0170.02817.88
5.5.210.0210.02317.94
5.5.200.0190.02617.75
5.5.190.0170.01917.84
5.5.180.0180.02717.82
5.5.170.0210.00817.13
5.5.160.0190.02517.85
5.5.150.0160.02717.86
5.5.140.0190.02517.90
5.5.130.0170.02117.90
5.5.120.0160.01917.84
5.5.110.0170.01817.91
5.5.100.0170.02317.85
5.5.90.0180.02317.86
5.5.80.0180.01417.93
5.5.70.0180.02217.88
5.5.60.0170.02617.82
5.5.50.0200.02317.88
5.5.40.0210.02117.89
5.5.30.0180.02517.78
5.5.20.0120.02117.91
5.5.10.0230.02117.91
5.5.00.0170.02317.73

preferences:
33.92 ms | 403 KiB | 5 Q