3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filenameNew = 'PX20170713_103320_2651093_00001'; $filenameOld = '5956e5781e4f1-20170630_233347_5712837_00001.xml'; //$timeslug = implode(array_slice(explode('_', rtrim(basename($fileToProcess), ".xml" )), 0, 2)); //$datetime = date('c', strtotime($timeslug)); /** * Get a date time object from an AX filename. * * Example filename: PX20170713_103320_2651093_00001.xml * * If this fails it will throw an appropriate exception to * be handled gracefully. */ function getDateFromFilename(string $filename) { $dateRegexp = '/([0-9]{4})([0-9]{2})([0-9]{2})/'; $timeRegexp = '/([0-9]{2})([0-9]{2})([0-9]{2})/'; $filename = ltrim($filename, 'PX'); list($date, $time) = explode('_', $filename); preg_match_all($dateRegexp, $date, $dateParts, PREG_SET_ORDER, 0); return implode('-', $dateParts); } var_dump(getDateFromFilename($filenameNew));

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.60.0120.00318.55
8.3.50.0110.00718.25
8.3.40.0120.00319.06
8.3.30.0050.01018.75
8.3.20.0040.00420.18
8.3.10.0040.00721.82
8.3.00.0070.00419.56
8.2.180.0120.00616.75
8.2.170.0080.00822.96
8.2.160.0180.00419.33
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00019.33
8.2.120.0000.00826.35
8.2.110.0090.00020.50
8.2.100.0070.00418.03
8.2.90.0060.00318.89
8.2.80.0050.00318.04
8.2.70.0050.00317.75
8.2.60.0060.00317.80
8.2.50.0050.00318.10
8.2.40.0030.00520.55
8.2.30.0040.00419.17
8.2.20.0000.00818.10
8.2.10.0030.00617.97
8.2.00.0040.00418.00
8.1.280.0100.01025.92
8.1.270.0000.00922.14
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0090.00020.76
8.1.230.0090.00319.12
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0080.00017.23
8.1.180.0080.00018.10
8.1.170.0040.00418.54
8.1.160.0000.00719.02
8.1.150.0080.00318.78
8.1.140.0020.00519.47
8.1.130.0060.00318.88
8.1.120.0040.00417.54
8.1.110.0000.00817.47
8.1.100.0030.00517.62
8.1.90.0050.00317.54
8.1.80.0070.00017.56
8.1.70.0040.00417.56
8.1.60.0030.00617.61
8.1.50.0050.00317.59
8.1.40.0080.00017.66
8.1.30.0030.00517.80
8.1.20.0000.00817.75
8.1.10.0030.00617.67
8.1.00.0040.00417.68
8.0.300.0020.00518.77
8.0.290.0020.00516.75
8.0.280.0050.00218.40
8.0.270.0000.00717.21
8.0.260.0070.00018.76
8.0.250.0030.00317.07
8.0.240.0040.00417.10
8.0.230.0090.00017.04
8.0.220.0030.00316.88
8.0.210.0000.00717.02
8.0.200.0070.00017.00
8.0.190.0040.00417.06
8.0.180.0070.00017.05
8.0.170.0000.00716.97
8.0.160.0040.00417.02
8.0.150.0080.00017.03
8.0.140.0040.00416.95
8.0.130.0060.00013.52
8.0.120.0040.00416.88
8.0.110.0000.00817.00
8.0.100.0000.00716.94
8.0.90.0040.00417.00
8.0.80.0140.00716.99
8.0.70.0000.00817.02
8.0.60.0000.00716.88
8.0.50.0000.00716.84
8.0.30.0070.01517.29
8.0.20.0080.01317.42
8.0.10.0040.00417.16
8.0.00.0120.01216.96
7.4.330.0060.00015.55
7.4.320.0000.00616.67
7.4.300.0000.00616.63
7.4.290.0060.00316.71
7.4.280.0000.00816.68
7.4.270.0070.00016.66
7.4.260.0000.00816.70
7.4.250.0030.00516.68
7.4.240.0020.00516.82
7.4.230.0070.00016.80
7.4.220.0060.01316.79
7.4.210.0090.00616.80
7.4.200.0000.00716.71
7.4.160.0080.00916.67
7.4.150.0070.01517.40
7.4.140.0140.00617.86
7.4.130.0160.00616.61
7.4.120.0090.00916.80
7.4.110.0100.00616.89
7.4.100.0090.01016.54
7.4.90.0070.01016.61
7.4.80.0110.00619.39
7.4.70.0120.00316.62
7.4.60.0060.00916.70
7.4.50.0040.01516.57
7.4.40.0070.01016.81
7.4.30.0140.00316.72
7.4.00.0030.01315.26
7.3.330.0020.00213.34
7.3.320.0000.00513.47
7.3.310.0030.00316.38
7.3.300.0070.00016.55
7.3.290.0050.00916.53
7.3.280.0090.00916.50
7.3.270.0110.00717.40
7.3.260.0110.00816.49
7.3.250.0110.01016.52
7.3.240.0100.00816.56
7.3.230.0110.00816.64
7.3.210.0030.01416.36
7.3.200.0100.00716.44
7.3.190.0070.01016.45
7.3.180.0030.01316.63
7.3.170.0090.00616.53
7.3.160.0060.01016.63
7.2.330.0030.01416.88
7.2.320.0100.00716.54
7.2.310.0100.00616.70
7.2.300.0090.00616.48
7.2.290.0140.00416.68
7.2.60.0030.00916.79
7.2.00.0040.01119.69
7.1.200.0040.01116.09
7.1.100.0000.00918.19
7.1.70.0740.00615.51
7.1.60.0810.01033.31
7.1.50.0890.02132.89
7.1.40.0670.02332.88
7.1.30.1490.01034.85
7.1.20.0250.01034.79
7.1.10.0100.01116.79
7.1.00.0070.01116.96
7.0.200.0600.01314.90
7.0.190.0530.01314.96
7.0.180.0570.01114.80
7.0.170.0030.01316.48
7.0.160.0080.01316.38
7.0.150.0040.01216.65
7.0.140.0050.01716.29
7.0.130.0100.01316.48
7.0.120.0120.00916.61
7.0.110.0140.01116.76
7.0.100.0060.01116.55
7.0.90.0110.01116.61
7.0.80.0140.00716.59
7.0.70.0040.01816.67
7.0.60.0070.01416.32
7.0.50.0110.01116.47
7.0.40.0080.01116.71
7.0.30.0060.01216.59
7.0.20.0110.01216.76
7.0.10.0050.01816.68
7.0.00.0080.01316.46

preferences:
39.1 ms | 401 KiB | 5 Q