3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "2053839077_On_10_15_2014_By_d.willard@10_58_30 AM"; $r2 = "/(?P<phone>\d{10})_On_(?P<m>\d{1,2})_(?P<d>\d{1,2})_(?P<Y>\d{4})_By_.*@(?P<h>\d{1,2})_(?P<i>\d{1,2})_(?P<s>\d{1,2}) (?P<ampm>[AM|PM]{2})/"; if (preg_match($r2, $filename, $bits)) { $phone = $bits['phone']; $hour = $bits['h']; if ($bits['ampm'] == 'PM') { $hour += 12; } $year = $bits['Y']; $month = sprintf('%02s', $bits['m']); $day = sprintf('%02s', $bits['d']); $hour = sprintf('%02s', $hour); $min = sprintf('%02s', $bits['i']); $sec = sprintf('%02s', $bits['s']); $timestamp = "$year-$month-$day $hour:$min:$sec"; } echo $phone.PHP_EOL; echo $timestamp.PHP_EOL; echo $bits['ampm']; ?>

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.0090.00618.43
8.3.50.0080.01221.36
8.3.40.0150.00418.90
8.3.30.0070.00719.13
8.3.20.0040.01120.30
8.3.10.0000.00823.66
8.3.00.0080.00019.50
8.2.180.0150.00016.86
8.2.170.0150.00622.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00422.36
8.2.110.0070.00421.25
8.2.100.0060.00619.75
8.2.90.0090.00019.17
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0110.00017.93
8.2.50.0000.00918.07
8.2.40.0050.00320.11
8.2.30.0070.00018.25
8.2.20.0000.00817.79
8.2.10.0000.00718.14
8.2.00.0040.00417.83
8.1.280.0170.00325.92
8.1.270.0000.00922.12
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.50
8.1.230.0070.00418.02
8.1.220.0030.00517.91
8.1.210.0080.00018.77
8.1.200.0040.00817.60
8.1.190.0050.00317.60
8.1.180.0000.00818.10
8.1.170.0040.00418.61
8.1.160.0040.00421.98
8.1.150.0040.00418.91
8.1.140.0040.00417.60
8.1.130.0000.00717.84
8.1.120.0000.00717.70
8.1.110.0000.00817.70
8.1.100.0050.00317.68
8.1.90.0000.00717.66
8.1.80.0040.00417.53
8.1.70.0000.00717.63
8.1.60.0070.00317.68
8.1.50.0040.00417.55
8.1.40.0030.00617.71
8.1.30.0000.00817.89
8.1.20.0040.00417.74
8.1.10.0070.00017.75
8.1.00.0040.00417.66
8.0.300.0000.00718.77
8.0.290.0000.00816.88
8.0.280.0030.00318.53
8.0.270.0000.00717.23
8.0.260.0030.00317.32
8.0.250.0050.00316.99
8.0.240.0030.00517.21
8.0.230.0040.00417.19
8.0.220.0030.00517.03
8.0.210.0030.00316.95
8.0.200.0040.00417.07
8.0.190.0040.00417.03
8.0.180.0050.00217.14
8.0.170.0080.00017.13
8.0.160.0030.00617.09
8.0.150.0040.00416.93
8.0.140.0000.00817.02
8.0.130.0060.00013.48
8.0.120.0040.00416.95
8.0.110.0050.00317.14
8.0.100.0030.00516.96
8.0.90.0000.00716.88
8.0.80.0130.00917.15
8.0.70.0030.00617.20
8.0.60.0040.00417.02
8.0.50.0000.00817.18
8.0.30.0140.01217.26
8.0.20.0170.00517.40
8.0.10.0060.00317.07
8.0.00.0110.00717.01
7.4.330.0000.00515.20
7.4.320.0000.00716.61
7.4.300.0030.00316.80
7.4.290.0040.00416.75
7.4.280.0030.00616.73
7.4.270.0080.00016.73
7.4.260.0000.00716.73
7.4.250.0040.00416.82
7.4.240.0020.00516.82
7.4.230.0030.00316.57
7.4.220.0040.01316.73
7.4.210.0140.00016.76
7.4.200.0000.00716.84
7.4.160.0100.00616.64
7.4.150.0070.01117.40
7.4.140.0060.01317.86
7.4.130.0100.00816.97
7.4.120.0100.00716.83
7.4.110.0070.01116.58
7.4.100.0100.01016.90
7.4.90.0070.01016.72
7.4.80.0050.01819.39
7.4.70.0060.00916.71
7.4.60.0130.00316.73
7.4.50.0050.00016.79
7.4.40.0090.00916.69
7.4.30.0060.01616.77
7.4.00.0080.00815.20
7.3.330.0050.00013.48
7.3.320.0030.00313.48
7.3.310.0000.00716.56
7.3.300.0030.00316.51
7.3.290.0130.00616.52
7.3.280.0120.00816.51
7.3.270.0090.00917.40
7.3.260.0130.00316.79
7.3.250.0120.00816.63
7.3.240.0100.01016.72
7.3.230.0100.00716.67
7.3.210.0180.00016.43
7.3.200.0140.00319.39
7.3.190.0140.00316.50
7.3.180.0090.00616.90
7.3.170.0060.00916.60
7.3.160.0060.01016.55
7.3.120.0070.01115.00
7.3.110.0100.00714.98
7.3.100.0090.00915.06
7.3.90.0070.00815.10
7.3.80.0030.01015.21
7.3.70.0100.00714.87
7.3.60.0090.00615.00
7.3.50.0000.01014.97
7.3.40.0070.00615.09
7.3.30.0070.00715.13
7.3.20.0070.01416.84
7.3.10.0060.00716.79
7.3.00.0070.00516.84
7.2.330.0120.01216.99
7.2.320.0140.00416.77
7.2.310.0030.01616.93
7.2.300.0130.00716.63
7.2.290.0050.01516.73
7.2.250.0060.00615.02
7.2.240.0130.00715.13
7.2.230.0040.01215.20
7.2.220.0040.01515.23
7.2.210.0080.00515.18
7.2.200.0030.01215.09
7.2.190.0070.01015.12
7.2.180.0040.01115.16
7.2.170.0090.00614.86
7.2.130.0100.00716.97
7.2.120.0000.00817.29
7.2.110.0070.00717.14
7.2.100.0000.00817.14
7.2.90.0100.00717.07
7.2.80.0090.00516.95
7.2.70.0030.00617.14
7.2.60.0040.00717.04
7.2.50.0030.00617.26
7.2.40.0000.01017.18
7.2.30.0040.00717.19
7.2.20.0040.00817.32
7.2.10.0090.00316.56
7.2.00.0030.01018.23
7.1.330.0100.00316.11
7.1.320.0030.01315.84
7.1.310.0060.00316.04
7.1.300.0040.00815.82
7.1.290.0090.00316.17
7.1.280.0030.00715.93
7.1.270.0130.00716.04
7.1.260.0030.00615.81
7.1.250.0000.01415.66
7.1.200.0070.00715.96
7.1.100.0060.00618.10
7.1.70.0130.00317.32
7.1.60.0150.00919.32
7.1.50.0040.00717.28
7.1.00.0070.07022.50
7.0.200.0080.00016.63
7.0.140.0030.07321.95
7.0.60.0030.07320.03
7.0.50.0070.05017.83
7.0.40.0100.04020.07
7.0.30.0200.06020.15
7.0.20.0130.04320.23
7.0.10.0100.08720.22
7.0.00.0130.07320.18
5.6.280.0030.07320.89
5.6.210.0070.08020.47
5.6.200.0000.04318.21
5.6.190.0070.08720.45
5.6.180.0270.07720.42
5.6.170.0330.04020.52
5.6.160.0070.05020.61
5.6.150.0100.05318.12
5.6.140.0130.07718.21
5.6.130.0100.05318.15
5.6.120.0070.06721.03
5.6.110.0070.07321.00
5.6.100.0070.08321.10
5.6.90.0070.07720.98
5.6.80.0030.08320.38
5.5.350.4270.04020.35
5.5.340.0130.08017.92
5.5.330.0070.06720.23
5.5.320.0200.05320.17
5.5.310.0330.07020.21
5.5.300.0170.04317.92
5.5.290.0030.05718.01
5.5.280.0130.04320.77
5.5.270.0070.05720.86
5.5.260.0070.08320.67
5.5.250.0070.03720.57
5.5.240.0030.03020.06
5.4.450.0270.04719.32
5.4.440.0100.06319.55
5.4.430.0200.05019.63
5.4.420.0730.00019.48
5.4.410.0670.00019.39
5.4.400.0600.00019.15
5.4.390.0700.00019.13
5.4.380.0630.00019.26
5.4.370.0600.00019.26
5.4.360.0600.00019.13
5.4.350.0670.00018.98
5.4.340.0050.03511.97
5.4.320.0050.03712.46
5.4.310.0040.04012.46
5.4.300.0070.03512.46
5.4.290.0060.03712.45
5.4.280.0040.03712.35
5.4.270.0060.03512.35
5.4.260.0070.05312.35
5.4.250.0060.04312.35
5.4.240.0100.03212.35
5.4.230.0040.03912.34
5.4.220.0070.03512.34
5.4.210.0080.03312.34
5.4.200.0060.03712.34
5.4.190.0030.03812.34
5.4.180.0070.03512.34
5.4.170.0090.04712.35
5.4.160.0070.03412.35
5.4.150.0060.03512.34
5.4.140.0040.04212.03
5.4.130.0040.03612.01
5.4.120.0040.03611.97
5.4.110.0030.03811.97
5.4.100.0060.03411.97
5.4.90.0080.03311.97
5.4.80.0050.03611.97
5.4.70.0030.03611.96
5.4.60.0060.03311.97
5.4.50.0060.03311.96
5.4.40.0050.03411.95
5.4.30.0040.03711.95
5.4.20.0060.03411.95
5.4.10.0040.03511.95
5.4.00.0050.03611.44
5.3.290.0080.03812.80
5.3.280.0050.03812.70
5.3.270.0060.04512.72
5.3.260.0090.05212.72
5.3.250.0040.03912.72
5.3.240.0050.03712.72
5.3.230.0050.03812.70
5.3.220.0060.03712.68
5.3.210.0080.03612.68
5.3.200.0060.03712.68
5.3.190.0060.04112.68
5.3.180.0060.03612.68
5.3.170.0060.03512.66
5.3.160.0050.03712.68
5.3.150.0070.04312.67
5.3.140.0030.03712.66
5.3.130.0070.04412.65
5.3.120.0100.05012.66
5.3.110.0090.03612.66
5.3.100.0060.03612.12
5.3.90.0070.05112.08
5.3.80.0050.03612.07
5.3.70.0040.03712.07
5.3.60.0110.03212.07
5.3.50.0050.03912.00
5.3.40.0090.03212.00
5.3.30.0050.03411.96
5.3.20.0050.03411.74
5.3.10.0030.03611.71
5.3.00.0070.04011.70
5.2.170.0060.0349.21
5.2.160.0030.0379.20
5.2.150.0080.0269.20
5.2.140.0070.0399.20
5.2.130.0040.0289.16
5.2.120.0050.0289.16
5.2.110.0040.0299.16
5.2.100.0030.0299.16
5.2.90.0030.0309.16
5.2.80.0050.0299.16
5.2.70.0040.0309.16
5.2.60.0070.0279.11
5.2.50.0040.0319.08
5.2.40.0040.0289.07
5.2.30.0080.0379.04
5.2.20.0030.0309.03
5.2.10.0050.0278.94
5.2.00.0060.0288.80
5.1.60.0010.0268.09
5.1.50.0060.0228.09
5.1.40.0040.0278.07
5.1.30.0050.0248.42
5.1.20.0040.0278.44
5.1.10.0030.0298.16
5.1.00.0060.0248.16
5.0.50.0020.0226.65
5.0.40.0040.0196.50
5.0.30.0020.0326.32
5.0.20.0020.0206.29
5.0.10.0050.0186.27
5.0.00.0040.0306.26
4.4.90.0030.0154.78
4.4.80.0020.0244.76
4.4.70.0030.0224.75
4.4.60.0030.0224.76
4.4.50.0050.0204.77
4.4.40.0020.0354.71
4.4.30.0020.0224.76
4.4.20.0050.0204.85
4.4.10.0030.0174.85
4.4.00.0020.0254.76
4.3.110.0060.0124.67
4.3.100.0030.0144.66
4.3.90.0030.0144.64
4.3.80.0020.0254.59
4.3.70.0040.0134.63
4.3.60.0020.0154.63
4.3.50.0020.0164.62
4.3.40.0040.0224.54
4.3.30.0020.0163.32
4.3.20.0000.0183.30
4.3.10.0000.0173.25
4.3.00.0000.0277.20

preferences:
42.04 ms | 401 KiB | 5 Q