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.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.0120.00318.68
8.3.50.0120.01022.13
8.3.40.0070.01118.92
8.3.30.0100.00319.21
8.3.20.0070.00720.16
8.3.10.0030.00623.54
8.3.00.0080.00019.51
8.2.180.0070.00716.88
8.2.170.0150.00022.96
8.2.160.0080.00620.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00422.36
8.2.110.0110.00020.41
8.2.100.0080.00418.04
8.2.90.0000.00818.22
8.2.80.0030.00517.97
8.2.70.0030.00617.88
8.2.60.0040.00718.04
8.2.50.0090.00018.07
8.2.40.0000.00819.83
8.2.30.0000.00718.13
8.2.20.0040.00417.94
8.2.10.0030.00618.09
8.2.00.0050.00317.89
8.1.280.0140.00025.92
8.1.270.0050.00322.18
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0070.00322.32
8.1.230.0040.00721.22
8.1.220.0090.00017.89
8.1.210.0030.00518.94
8.1.200.0060.00317.60
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0050.00318.76
8.1.160.0050.00322.12
8.1.150.0060.00318.94
8.1.140.0050.00217.55
8.1.130.0070.00017.90
8.1.120.0070.00017.63
8.1.110.0040.00417.64
8.1.100.0000.00717.70
8.1.90.0060.00317.64
8.1.80.0040.00417.68
8.1.70.0030.00317.53
8.1.60.0080.00017.80
8.1.50.0000.00817.68
8.1.40.0050.00317.67
8.1.30.0000.00817.79
8.1.20.0000.00717.87
8.1.10.0070.00017.77
8.1.00.0040.00417.76
8.0.300.0040.00420.21
8.0.290.0020.00517.00
8.0.280.0030.00518.39
8.0.270.0000.00717.25
8.0.260.0000.00717.43
8.0.250.0000.00717.19
8.0.240.0080.00017.03
8.0.230.0030.00317.14
8.0.220.0000.00717.10
8.0.210.0070.00016.94
8.0.200.0040.00417.13
8.0.190.0030.00417.18
8.0.180.0040.00417.11
8.0.170.0000.00817.16
8.0.160.0030.00617.13
8.0.150.0000.00717.00
8.0.140.0040.00717.07
8.0.130.0000.00613.43
8.0.120.0040.00417.07
8.0.110.0000.00717.03
8.0.100.0000.00816.91
8.0.90.0050.00316.95
8.0.80.0060.01617.03
8.0.70.0040.00416.88
8.0.60.0030.00516.95
8.0.50.0000.00817.14
8.0.30.0100.01017.10
8.0.20.0110.00817.40
8.0.10.0000.00917.27
8.0.00.0140.00917.07
7.4.330.0060.00015.12
7.4.320.0000.00716.74
7.4.300.0030.00516.85
7.4.290.0000.00716.87
7.4.280.0060.00316.89
7.4.270.0000.00716.74
7.4.260.0030.00516.66
7.4.250.0000.00816.82
7.4.240.0040.00416.69
7.4.230.0030.00316.88
7.4.220.0060.01216.95
7.4.210.0050.01116.82
7.4.200.0050.00316.96
7.4.160.0110.00616.84
7.4.150.0130.00317.40
7.4.140.0100.01217.86
7.4.130.0150.00516.69
7.4.120.0090.00816.78
7.4.110.0100.00716.74
7.4.100.0040.01816.85
7.4.90.0090.00916.73
7.4.80.0100.00719.39
7.4.70.0030.01916.98
7.4.60.0100.00716.84
7.4.50.0020.00216.79
7.4.40.0070.01116.86
7.4.30.0030.01616.74
7.4.00.0060.01015.24
7.3.330.0000.00613.36
7.3.320.0000.00613.42
7.3.310.0030.00516.48
7.3.300.0040.00416.34
7.3.290.0060.01216.55
7.3.280.0070.01016.48
7.3.270.0110.00817.40
7.3.260.0100.00716.61
7.3.250.0170.01016.61
7.3.240.0120.01216.46
7.3.230.0140.00716.64
7.3.210.0130.00316.80
7.3.200.0190.00319.39
7.3.190.0110.00716.41
7.3.180.0040.01116.58
7.3.170.0030.01316.57
7.3.160.0070.01016.83
7.3.120.0110.00715.04
7.3.110.0060.00914.96
7.3.100.0150.00015.16
7.3.90.0060.00914.94
7.3.80.0000.01515.30
7.3.70.0000.00914.89
7.3.60.0080.00814.93
7.3.50.0080.00414.91
7.3.40.0040.01114.89
7.3.30.0090.00915.24
7.3.20.0060.00616.89
7.3.10.0040.00916.64
7.3.00.0030.01016.92
7.2.330.0060.01916.68
7.2.320.0090.00816.93
7.2.310.0180.00316.67
7.2.300.0090.01316.83
7.2.290.0090.01517.01
7.2.250.0070.01115.35
7.2.240.0070.01015.07
7.2.230.0120.00315.20
7.2.220.0060.00915.24
7.2.210.0030.00615.26
7.2.200.0060.00915.20
7.2.190.0060.00915.01
7.2.180.0040.01115.43
7.2.170.0060.00915.46
7.2.130.0070.00917.04
7.2.120.0010.00917.09
7.2.110.0050.00717.00
7.2.100.0030.01117.23
7.2.90.0050.00817.25
7.2.80.0050.00917.19
7.2.70.0080.00817.18
7.2.60.0030.00717.13
7.2.50.0100.00317.11
7.2.40.0050.01017.11
7.2.30.0070.00717.06
7.2.20.0060.00817.10
7.2.10.0100.00317.21
7.2.00.0040.01017.98
7.1.330.0070.00716.05
7.1.320.0070.00716.05
7.1.310.0120.00316.12
7.1.300.0030.00616.14
7.1.290.0060.00915.66
7.1.280.0080.00415.91
7.1.270.0040.01115.97
7.1.260.0060.00616.00
7.1.250.0130.00015.93
7.1.240.0040.01115.84
7.1.230.0060.00616.12
7.1.220.0080.00416.00
7.1.210.0040.00415.75
7.1.200.0030.00716.20
7.1.190.0040.00816.01
7.1.180.0000.01215.67
7.1.170.0110.00415.93
7.1.160.0040.00715.69
7.1.150.0060.00316.00
7.1.140.0000.01016.15
7.1.130.0070.00715.96
7.1.120.0100.00015.72
7.1.110.0030.01016.04
7.1.100.0070.00516.89
7.1.90.0000.01415.70
7.1.80.0110.00015.75
7.1.70.0060.00816.58
7.1.60.0080.01017.67
7.1.50.0050.00816.46
7.1.40.0070.00715.96
7.1.30.0080.00015.93
7.1.20.0070.00715.82
7.1.10.0100.00315.82
7.1.00.0040.04319.18
7.0.330.0030.01015.53
7.0.320.0040.00415.18
7.0.310.0030.01015.34
7.0.300.0040.00415.45
7.0.290.0100.00315.62
7.0.280.0030.00715.80
7.0.270.0060.00315.59
7.0.260.0050.00515.73
7.0.250.0000.01115.61
7.0.240.0060.00615.72
7.0.230.0030.01015.63
7.0.220.0030.00815.65
7.0.210.0030.00915.30
7.0.200.0080.00116.17
7.0.190.0030.01015.77
7.0.180.0110.00315.54
7.0.170.0030.00715.69
7.0.160.0110.00415.26
7.0.150.0040.00815.52
7.0.140.0030.04218.80
7.0.130.0090.00015.68
7.0.120.0000.01015.70
7.0.110.0030.01015.41
7.0.100.0070.00715.39
7.0.90.0030.01115.64
7.0.80.0100.00315.44
7.0.70.0040.00715.56
7.0.60.0100.03117.63
7.0.50.0080.03116.84
7.0.40.0060.03716.77
7.0.30.0260.02516.97
7.0.20.0190.04316.74
7.0.10.0060.03316.90
7.0.00.0080.04516.99
5.6.380.0110.00414.49
5.6.370.0060.00614.39
5.6.360.0030.01214.42
5.6.350.0030.00914.79
5.6.340.0030.01013.99
5.6.330.0000.01214.48
5.6.320.0000.01414.64
5.6.310.0040.01114.27
5.6.300.0040.00714.30
5.6.290.0060.00314.48
5.6.280.0050.04117.71
5.6.270.0070.00314.89
5.6.260.0060.00314.38
5.6.250.0040.00814.70
5.6.240.0000.01314.68
5.6.230.0050.00314.57
5.6.220.0110.00014.41
5.6.210.0080.03817.54
5.6.200.0080.04316.33
5.6.190.0070.02917.31
5.6.180.0150.03717.45
5.6.170.0200.02717.38
5.6.160.0030.04117.28
5.6.150.0050.03016.42
5.6.140.0070.03716.33
5.6.130.0050.02716.24
5.6.120.0040.03617.69
5.6.110.0120.04317.60
5.6.100.0060.04617.82
5.6.90.0020.03717.77
5.6.80.0070.04017.41
5.6.70.1820.02217.36
5.6.60.0060.00914.48
5.6.50.0070.00714.22
5.6.40.0030.00914.61
5.6.30.0030.01014.32
5.6.20.0070.00614.73
5.6.10.0060.00314.16
5.6.00.0090.00614.57
5.5.380.0060.00010.93
5.5.370.0040.00411.07
5.5.360.0040.00711.45
5.5.350.0030.02515.79
5.5.340.0070.02014.57
5.5.330.0020.02715.66
5.5.320.0110.02115.77
5.5.310.0200.03515.68
5.5.300.0060.04314.33
5.5.290.0070.02714.54
5.5.280.0040.04415.94
5.5.270.0060.02815.99
5.5.260.0030.02116.20
5.5.250.0020.04215.98
5.5.240.0150.03715.69
5.5.230.0030.00511.21
5.5.220.0050.00311.28
5.5.210.0060.00011.20
5.5.200.0040.00811.29
5.5.190.0030.00911.13
5.5.180.0130.00011.18
5.5.170.0060.00611.12
5.5.160.0030.00311.09
5.5.150.0030.00511.32
5.5.140.0060.00611.23
5.5.130.0060.00311.23
5.5.120.0060.00611.34
5.5.110.0000.00611.10
5.5.100.0060.00611.14
5.5.90.0000.00610.87
5.5.80.0100.00011.15
5.5.70.0030.00711.11
5.5.60.0030.00611.07
5.5.50.0050.00211.16
5.5.40.0040.00711.30
5.5.30.0030.00310.86
5.5.20.0000.01210.97
5.5.10.0040.00811.29
5.5.00.0030.00610.93
5.4.450.0070.03515.20
5.4.440.0100.03415.36
5.4.430.0160.02515.06
5.4.420.0350.00415.15
5.4.410.0380.00015.20
5.4.400.0330.00214.94
5.4.390.0320.00315.04
5.4.380.0350.00315.06
5.4.370.0330.00214.95
5.4.360.0350.00215.15
5.4.350.0330.00114.98
5.4.340.0050.01911.58
5.4.330.0030.01011.09
5.4.320.0030.02411.70
5.4.310.0060.01911.75
5.4.300.0040.02311.72
5.4.290.0050.02311.58
5.4.280.0070.01611.73
5.4.270.0060.02111.60
5.4.260.0020.02411.75
5.4.250.0060.02111.73
5.4.240.0040.02011.70
5.4.230.0050.02211.72
5.4.220.0030.02111.70
5.4.210.0090.02111.77
5.4.200.0040.02411.74
5.4.190.0080.01811.72
5.4.180.0060.01911.71
5.4.170.0040.02011.73
5.4.160.0040.02111.78
5.4.150.0040.02311.60
5.4.140.0020.02211.65
5.4.130.0030.02211.62
5.4.120.0040.02211.56
5.4.110.0070.01611.54
5.4.100.0030.02111.61
5.4.90.0060.02011.43
5.4.80.0050.02111.60
5.4.70.0040.01911.54
5.4.60.0050.02111.58
5.4.50.0040.02011.36
5.4.40.0060.01711.42
5.4.30.0050.02211.52
5.4.20.0070.01611.47
5.4.10.0070.01711.51
5.4.00.0050.02111.26
5.3.290.0040.02411.73
5.3.280.0050.02011.62
5.3.270.0050.02211.61
5.3.260.0020.02411.69
5.3.250.0020.02111.64
5.3.240.0020.02411.61
5.3.230.0020.02211.61
5.3.220.0050.02111.61
5.3.210.0040.02311.61
5.3.200.0050.01911.58
5.3.190.0060.01811.63
5.3.180.0040.02011.67
5.3.170.0070.02011.65
5.3.160.0080.01811.63
5.3.150.0050.01911.65
5.3.140.0020.02711.58
5.3.130.0050.02211.58
5.3.120.0060.02311.57
5.3.110.0040.02411.57
5.3.100.0020.02411.30
5.3.90.0050.01911.32
5.3.80.0050.02011.28
5.3.70.0070.01911.28
5.3.60.0040.02211.34
5.3.50.0050.02111.24
5.3.40.0070.01911.24
5.3.30.0030.02111.24
5.3.20.0040.02011.12
5.3.10.0040.02111.10
5.3.00.0030.02311.09
5.2.170.0020.0199.85
5.2.160.0040.0169.85
5.2.150.0040.0189.85
5.2.140.0040.0169.84
5.2.130.0070.0159.83
5.2.120.0030.0189.83
5.2.110.0070.0139.83
5.2.100.0050.0199.82
5.2.90.0040.0199.82
5.2.80.0020.0199.82
5.2.70.0050.0169.82
5.2.60.0030.0199.80
5.2.50.0020.0219.79
5.2.40.0010.0219.78
5.2.30.0030.0169.76
5.2.20.0030.0179.76
5.2.10.0040.0179.72
5.2.00.0030.0159.65
5.1.60.0020.0159.29
5.1.50.0020.0149.29
5.1.40.0050.0129.28
5.1.30.0050.0149.45
5.1.20.0040.0139.46
5.1.10.0040.0189.33
5.1.00.0020.0179.33
5.0.50.0040.0168.57
5.0.40.0010.0168.50
5.0.30.0020.0198.40
5.0.20.0050.0138.39
5.0.10.0030.0128.38
5.0.00.0020.0238.38
4.4.90.0010.0127.63
4.4.80.0050.0137.62
4.4.70.0010.0127.62
4.4.60.0020.0097.62
4.4.50.0010.0107.63
4.4.40.0010.0167.60
4.4.30.0000.0127.62
4.4.20.0030.0097.67
4.4.10.0020.0107.67
4.4.00.0020.0157.62
4.3.110.0020.0097.58
4.3.100.0050.0077.58
4.3.90.0020.0097.56
4.3.80.0020.0137.54
4.3.70.0020.0107.56
4.3.60.0050.0117.56
4.3.50.0020.0127.56
4.3.40.0040.0187.51
4.3.30.0010.0106.91
4.3.20.0020.0116.89
4.3.10.0020.0096.87
4.3.00.0000.0188.84

preferences:
53.41 ms | 401 KiB | 5 Q