3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "2053839077_On_10_15_2014_By_d.willard@10_58_30 PM"; $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])/"; 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; ?>

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.32
8.3.50.0100.01021.17
8.3.40.0090.00619.14
8.3.30.0040.01119.04
8.3.20.0000.00720.16
8.3.10.0000.00821.80
8.3.00.0040.00419.38
8.2.180.0040.01116.63
8.2.170.0070.00722.96
8.2.160.0080.00620.42
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00322.18
8.2.110.0060.00320.57
8.2.100.0120.00018.03
8.2.90.0000.00819.34
8.2.80.0000.00817.97
8.2.70.0040.00417.75
8.2.60.0070.00317.93
8.2.50.0040.00418.07
8.2.40.0030.00618.22
8.2.30.0000.00818.22
8.2.20.0040.00417.79
8.2.10.0040.00418.21
8.2.00.0000.00817.84
8.1.280.0030.01425.92
8.1.270.0050.00322.10
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00423.82
8.1.230.0080.00419.11
8.1.220.0040.00417.75
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0090.00017.25
8.1.180.0040.00418.10
8.1.170.0030.00518.83
8.1.160.0030.00522.00
8.1.150.0040.00418.89
8.1.140.0060.00317.54
8.1.130.0000.00717.88
8.1.120.0050.00217.65
8.1.110.0050.00317.52
8.1.100.0030.00517.67
8.1.90.0090.00017.62
8.1.80.0000.00717.50
8.1.70.0000.00717.50
8.1.60.0000.00917.77
8.1.50.0050.00317.60
8.1.40.0050.00217.75
8.1.30.0040.00417.80
8.1.20.0040.00417.81
8.1.10.0040.00417.73
8.1.00.0040.00417.62
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.49
8.0.270.0000.00717.17
8.0.260.0000.00617.34
8.0.250.0040.00417.07
8.0.240.0040.00417.06
8.0.230.0070.00017.04
8.0.220.0030.00317.05
8.0.210.0030.00316.91
8.0.200.0040.00417.05
8.0.190.0040.00417.05
8.0.180.0040.00417.05
8.0.170.0040.00417.04
8.0.160.0080.00316.97
8.0.150.0050.00217.06
8.0.140.0070.00316.89
8.0.130.0030.00313.45
8.0.120.0000.00916.98
8.0.110.0040.00416.96
8.0.100.0020.00516.96
8.0.90.0070.00016.94
8.0.80.0060.01717.00
8.0.70.0030.00517.13
8.0.60.0040.00417.04
8.0.50.0040.00417.02
8.0.30.0100.01117.19
8.0.20.0110.00817.40
8.0.10.0040.00417.00
8.0.00.0030.01417.02
7.4.330.0050.00015.13
7.4.320.0030.00316.66
7.4.300.0030.00316.84
7.4.290.0040.00416.83
7.4.280.0040.00416.74
7.4.270.0000.00716.85
7.4.260.0070.00016.87
7.4.250.0040.00416.60
7.4.240.0050.00216.80
7.4.230.0000.00716.65
7.4.220.0110.00716.68
7.4.210.0120.01216.94
7.4.200.0030.00316.79
7.4.160.0060.01016.52
7.4.150.0170.00317.40
7.4.140.0090.01217.86
7.4.130.0110.00916.76
7.4.120.0110.00616.74
7.4.110.0090.00916.71
7.4.100.0080.00916.77
7.4.90.0140.00316.79
7.4.80.0090.00919.39
7.4.70.0030.01616.66
7.4.60.0100.00716.74
7.4.50.0000.00416.71
7.4.40.0060.01116.68
7.4.30.0140.01116.70
7.4.00.0090.00715.12
7.3.330.0030.00313.38
7.3.320.0030.00313.46
7.3.310.0030.00516.25
7.3.300.0030.00316.48
7.3.290.0170.00016.47
7.3.280.0090.00816.50
7.3.270.0080.01117.40
7.3.260.0130.00316.78
7.3.250.0080.01016.62
7.3.240.0160.00416.82
7.3.230.0060.01216.86
7.3.210.0120.00316.67
7.3.200.0070.01519.39
7.3.190.0100.00716.68
7.3.180.0060.00916.71
7.3.170.0090.00916.80
7.3.160.0060.00916.64
7.3.120.0030.01015.27
7.3.110.0090.00315.32
7.3.100.0090.00614.93
7.3.90.0030.00715.02
7.3.80.0060.00315.13
7.3.70.0030.01315.11
7.3.60.0040.00715.12
7.3.50.0040.00415.09
7.3.40.0060.00614.91
7.3.30.0000.01315.07
7.3.20.0060.00916.65
7.3.10.0080.00316.71
7.3.00.0100.00616.89
7.2.330.0000.01816.76
7.2.320.0060.01216.78
7.2.310.0080.01517.01
7.2.300.0030.01916.73
7.2.290.0080.01116.76
7.2.250.0070.01115.29
7.2.240.0070.01315.48
7.2.230.0030.01315.29
7.2.220.0000.00915.27
7.2.210.0040.01115.25
7.2.200.0070.00715.40
7.2.190.0030.01315.36
7.2.180.0060.00915.24
7.2.170.0080.00315.15
7.2.60.0040.01116.97
7.2.00.0000.01319.79
7.1.330.0000.01416.20
7.1.320.0080.00416.05
7.1.310.0080.00316.27
7.1.300.0030.01015.89
7.1.290.0030.01216.11
7.1.280.0070.00716.03
7.1.270.0030.01215.93
7.1.260.0040.01415.77
7.1.200.0000.01016.14
7.1.100.0030.01018.11
7.1.70.0000.00717.27
7.1.60.0140.01119.32
7.1.50.0040.00817.27
7.1.00.0030.07722.33
7.0.200.0130.00316.63
7.0.140.0130.06322.00
7.0.100.0130.07320.06
7.0.90.0030.09019.91
7.0.80.0000.09019.90
7.0.70.0070.07019.98
7.0.60.0100.05319.95
7.0.50.0530.03020.29
7.0.40.0030.08320.08
7.0.30.0070.08020.11
7.0.20.0030.08319.96
7.0.10.0170.06719.99
7.0.00.0130.07720.17
5.6.280.0000.07720.81
5.6.250.0130.06020.66
5.6.240.0030.07320.51
5.6.230.0100.07720.50
5.6.220.0070.06020.54
5.6.210.0030.08020.57
5.6.200.0130.07320.93
5.6.190.0170.07021.11
5.6.180.0070.08321.00
5.6.170.0100.08021.02
5.6.160.0170.06721.07
5.6.150.0070.08720.96
5.6.140.0130.07721.05
5.6.130.0030.05321.02
5.6.120.0130.08021.16
5.6.110.0130.05721.12
5.6.100.0100.07721.07
5.6.90.0000.09021.14
5.6.80.0070.07720.43
5.6.70.0030.08320.40
5.6.60.0170.07020.37
5.6.50.0030.07020.47
5.6.40.0100.07720.30
5.6.30.0100.08020.53
5.6.20.0130.07020.29
5.6.10.0030.08320.34
5.6.00.0100.06720.44
5.5.380.0030.08020.39
5.5.370.0170.05020.52
5.5.360.0100.08020.35
5.5.350.0070.08020.47
5.5.340.0030.05020.83
5.5.330.0130.07320.79
5.5.320.0070.04020.89
5.5.310.0070.08320.89
5.5.300.0170.07020.64
5.5.290.0030.08320.83
5.5.280.0030.05320.88
5.5.270.0030.06320.88
5.5.260.0000.08720.63
5.5.250.0030.07720.70
5.5.240.0130.07320.31
5.5.230.0030.08020.10
5.5.220.0130.07320.21
5.5.210.0000.08020.21
5.5.200.0070.07320.28
5.5.190.0030.08720.16
5.5.180.0270.04720.22
5.5.160.0000.08020.19
5.5.150.0070.08320.15
5.5.140.0100.07020.08
5.5.130.0100.07020.17
5.5.120.0070.07320.08
5.5.110.0170.07020.24
5.5.100.0030.06019.95
5.5.90.0170.06720.14
5.5.80.0000.06320.14
5.5.70.0030.08020.06
5.5.60.0070.05320.16
5.5.50.0100.07720.16
5.5.40.0130.07020.04
5.5.30.0070.07720.05
5.5.20.0130.07320.07
5.5.10.0030.07319.93
5.5.00.0030.08320.06
5.4.450.0200.07019.15
5.4.440.0070.07719.23
5.4.430.0000.08319.35
5.4.420.0000.05719.30
5.4.410.0130.07019.10
5.4.400.0070.06718.90
5.4.390.0130.04319.03
5.4.380.0070.07318.79
5.4.370.0170.06319.04
5.4.360.0070.07318.90
5.4.350.0170.04019.04
5.4.340.0100.07018.98
5.4.320.0070.04718.79
5.4.310.0030.07318.98
5.4.300.0100.04019.10
5.4.290.0070.05019.14
5.4.280.0130.07318.81
5.4.270.0070.08019.02
5.4.260.0130.06319.03
5.4.250.0030.05318.78
5.4.240.0070.07718.78
5.4.230.0000.06318.97
5.4.220.0070.07719.23
5.4.210.0030.04018.77
5.4.200.0070.07719.05
5.4.190.0170.06318.89
5.4.180.0070.06719.11
5.4.170.0200.06019.13
5.4.160.0030.06319.21
5.4.150.0170.06019.13
5.4.140.0130.07016.07
5.4.130.0170.06316.29
5.4.120.0100.06316.33
5.4.110.0000.06316.45
5.4.100.0130.06316.26
5.4.90.0030.05316.26
5.4.80.0100.07016.20
5.4.70.0100.06716.31
5.4.60.0000.08016.19
5.4.50.0070.06016.34
5.4.40.0100.06716.24
5.4.30.0130.06316.42
5.4.20.0130.06316.18
5.4.10.0070.07316.21
5.4.00.0100.06315.72
5.3.290.0070.07314.67
5.3.280.0070.07714.59
5.3.270.0070.06714.60
5.3.260.0130.06714.45
5.3.250.0100.07014.60
5.3.240.0070.07714.60
5.3.230.0170.06714.46
5.3.220.0070.07314.56
5.3.210.0070.07714.54
5.3.200.0070.06314.43
5.3.190.0130.06714.40
5.3.180.0030.07014.54
5.3.170.0070.07014.56
5.3.160.0200.06314.57
5.3.150.0070.07714.51
5.3.140.0070.08014.42
5.3.130.0130.07014.54
5.3.120.0000.08714.54
5.3.110.0070.07014.42
5.3.100.0030.07013.99
5.3.90.0070.07314.00
5.3.80.0070.07713.79
5.3.70.0070.07714.02
5.3.60.0100.07014.01
5.3.50.0100.07013.94
5.3.40.0100.07313.91
5.3.30.0100.07313.77
5.3.20.0070.04013.48
5.3.10.0030.03713.62
5.3.00.0100.03313.43
5.2.170.0000.06712.56
5.2.160.0130.05712.56
5.2.150.0030.06312.56
5.2.140.0070.06012.56
5.2.130.0030.02712.56
5.2.120.0030.03712.56
5.2.110.0030.04012.56
5.2.100.0000.03712.56
5.2.90.0000.06012.56
5.2.80.0100.02712.56
5.2.70.0030.03012.56
5.2.60.0030.03012.56
5.2.50.0000.03312.56
5.2.40.0000.03012.56
5.2.30.0030.04312.56
5.2.20.0000.03012.56
5.2.10.0030.02712.56
5.2.00.0030.03712.56
5.1.60.0030.02012.56
5.1.50.0000.02712.56
5.1.40.0030.02712.56
5.1.30.0030.02312.56
5.1.20.0000.05012.56
5.1.10.0070.01712.56
5.1.00.0030.02312.56
5.0.50.0000.02712.56
5.0.40.0030.02312.56
5.0.30.0000.05312.56
5.0.20.0000.03312.56
5.0.10.0000.03312.56
5.0.00.0030.02312.56
4.4.90.0000.01712.56
4.4.80.0030.01312.56
4.4.70.0100.01312.56
4.4.60.0030.01312.56
4.4.50.0000.02012.56
4.4.40.0000.03712.56
4.4.30.0000.01312.56
4.4.20.0000.03012.56
4.4.10.0000.01712.56
4.4.00.0000.05312.56
4.3.110.0000.01312.56
4.3.100.0000.02312.56
4.3.90.0000.01712.56
4.3.80.0000.04012.56
4.3.70.0070.02712.56
4.3.60.0000.02012.56
4.3.50.0100.01712.56
4.3.40.0030.04012.56
4.3.30.0000.02012.56
4.3.20.0000.03012.56
4.3.10.0000.02312.56
4.3.00.0000.03312.56

preferences:
58.81 ms | 401 KiB | 5 Q