3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename1 = "[Study] - Walton, Charles E 01-02-2012.txt"; $filename2 = "[Rx] - 01-02-2003 - Walton, Charles E.pdf"; function validate_date($filename) { preg_match("/(.*)(\d+-\d+-\d+)(.*)/",trim($filename),$matches); $date_arr = explode("-",$matches[2]); $month = str_pad($matches[0], 2, '0', STR_PAD_LEFT); $day = str_pad($matches[1], 2, '0', STR_PAD_LEFT); $year = $matches[2]; if ($year < 100) { if ($year > date("Y")+10) $year = $year + 1900; else $year = $year + 2000; } $date = $month . "-" . $day . "-" . $year; $filename = $matches[1] . $date . $matches[3]; return $filename; } echo validate_date($filename1);

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.0070.01018.58
8.3.50.0070.01421.99
8.3.40.0070.00719.17
8.3.30.0060.01219.17
8.3.20.0040.00420.16
8.3.10.0040.00423.48
8.3.00.0040.00419.63
8.2.180.0040.01118.66
8.2.170.0110.00722.96
8.2.160.0070.00720.27
8.2.150.0140.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00022.01
8.2.110.0080.00020.35
8.2.100.0110.00018.34
8.2.90.0040.00419.34
8.2.80.0080.00018.00
8.2.70.0090.00017.88
8.2.60.0030.00618.17
8.2.50.0060.00318.07
8.2.40.0030.00620.13
8.2.30.0000.00818.21
8.2.20.0040.00418.04
8.2.10.0000.00718.18
8.2.00.0040.00418.14
8.1.280.0190.00325.92
8.1.270.0090.00022.25
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0090.00023.92
8.1.230.0040.00819.16
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0040.00417.38
8.1.190.0060.00317.47
8.1.180.0000.00918.10
8.1.170.0000.00818.84
8.1.160.0040.00422.07
8.1.150.0050.00219.01
8.1.140.0070.00017.74
8.1.130.0000.00717.92
8.1.120.0040.00417.77
8.1.110.0000.00817.79
8.1.100.0000.00817.75
8.1.90.0030.00517.81
8.1.80.0040.00417.65
8.1.70.0030.00317.68
8.1.60.0090.00017.83
8.1.50.0050.00317.66
8.1.40.0050.00217.71
8.1.30.0030.00617.77
8.1.20.0030.00617.75
8.1.10.0000.00717.69
8.1.00.0030.00517.68
8.0.300.0040.00418.77
8.0.290.0040.00417.13
8.0.280.0030.00318.54
8.0.270.0000.00717.33
8.0.260.0060.00017.27
8.0.250.0070.00017.28
8.0.240.0040.00417.32
8.0.230.0000.00717.32
8.0.220.0000.00717.25
8.0.210.0040.00417.27
8.0.200.0000.00717.16
8.0.190.0040.00417.30
8.0.180.0040.00417.11
8.0.170.0040.00417.18
8.0.160.0040.00417.17
8.0.150.0050.00317.16
8.0.140.0080.00017.04
8.0.130.0060.00013.56
8.0.120.0030.00517.20
8.0.110.0050.00217.16
8.0.100.0040.00417.03
8.0.90.0040.00417.25
8.0.80.0120.01217.16
8.0.70.0070.00017.01
8.0.60.0040.00417.01
8.0.50.0040.00417.17
8.0.30.0120.01117.46
8.0.20.0100.01617.46
8.0.10.0040.00417.42
8.0.00.0100.00717.18
7.4.330.0000.00615.00
7.4.320.0060.00016.82
7.4.300.0000.00616.92
7.4.290.0030.00316.90
7.4.280.0040.00716.85
7.4.270.0000.00716.92
7.4.260.0050.00316.77
7.4.250.0070.00016.86
7.4.240.0020.00516.81
7.4.230.0060.00316.80
7.4.220.0100.00716.72
7.4.210.0040.01116.94
7.4.200.0000.00716.88
7.4.160.0100.00617.00
7.4.150.0100.01217.40
7.4.140.0080.01217.86
7.4.130.0150.00316.89
7.4.120.0070.01316.81
7.4.110.0080.01016.97
7.4.100.0130.00416.76
7.4.90.0080.00816.75
7.4.80.0170.00419.39
7.4.70.0130.00316.82
7.4.60.0070.01016.79
7.4.50.0000.00416.48
7.4.40.0090.01216.84
7.4.30.0100.00716.67
7.4.10.0080.01115.27
7.4.00.0060.01215.06
7.3.330.0000.00513.50
7.3.320.0000.00513.50
7.3.310.0000.00916.67
7.3.300.0040.00416.67
7.3.290.0070.00716.56
7.3.280.0040.01316.62
7.3.270.0070.01017.40
7.3.260.0100.00716.87
7.3.250.0100.00716.76
7.3.240.0090.01716.78
7.3.230.0110.00916.59
7.3.210.0090.00916.90
7.3.200.0160.00619.39
7.3.190.0140.00316.70
7.3.180.0080.00816.66
7.3.170.0110.01217.00
7.3.160.0030.01316.77
7.3.130.0070.01315.29
7.3.120.0070.01014.98
7.3.110.0100.01015.11
7.3.100.0030.01214.99
7.3.90.0060.01015.25
7.3.80.0070.00514.95
7.3.70.0070.00715.21
7.3.60.0040.00615.17
7.3.50.0020.01015.14
7.3.40.0040.00714.96
7.3.30.0000.01015.10
7.3.20.0060.01016.78
7.3.10.0080.00417.11
7.3.00.0060.00916.99
7.2.330.0070.01016.90
7.2.320.0150.00316.95
7.2.310.0120.00617.10
7.2.300.0140.00316.70
7.2.290.0190.00416.99
7.2.260.0030.01715.38
7.2.250.0070.01115.29
7.2.240.0070.01015.15
7.2.230.0090.00915.39
7.2.220.0090.00715.37
7.2.210.0040.01015.32
7.2.200.0100.00715.29
7.2.190.0030.00815.42
7.2.180.0020.01215.18
7.2.170.0040.00715.17
7.2.160.0000.01315.18
7.2.150.0020.01317.17
7.2.140.0080.00817.16
7.2.130.0060.00716.97
7.2.120.0090.00717.17
7.2.110.0070.00717.25
7.2.100.0050.00717.21
7.2.90.0040.01117.18
7.2.80.0050.01017.36
7.2.70.0060.00917.27
7.2.60.0060.00617.17
7.2.50.0050.00817.24
7.2.40.0050.01017.14
7.2.30.0050.01117.31
7.2.20.0080.00317.21
7.2.10.0040.01117.04
7.2.00.0060.00617.18
7.1.330.0040.01115.96
7.1.320.0080.00816.16
7.1.310.0050.00715.95
7.1.300.0060.00416.09
7.1.290.0030.00716.05
7.1.280.0050.00816.00
7.1.270.0090.00615.86
7.1.260.0060.00715.99
7.1.250.0070.00716.13
7.1.240.0070.00716.05
7.1.230.0050.00516.08
7.1.220.0070.00716.18
7.1.210.0080.00715.95
7.1.200.0020.00916.12
7.1.190.0000.01215.84
7.1.180.0100.00516.15
7.1.170.0050.00516.16
7.1.160.0100.00316.15
7.1.150.0030.01016.13
7.1.140.0050.00715.86
7.1.130.0050.00615.95
7.1.120.0030.00716.07
7.1.110.0090.00716.22
7.1.100.0090.00316.01
7.1.90.0050.00715.97
7.1.80.0020.01016.03
7.1.70.0050.00716.65
7.1.60.0080.01117.21
7.1.50.0070.00716.33
7.1.40.0050.00816.12
7.1.30.0070.01016.04
7.1.20.0090.00716.06
7.1.10.0050.00916.03
7.1.00.0060.02718.15
7.0.330.0040.00915.61
7.0.320.0050.00515.70
7.0.310.0060.00515.54
7.0.300.0020.00915.38
7.0.290.0060.00915.54
7.0.280.0060.00815.55
7.0.270.0060.00315.62
7.0.260.0070.00815.55
7.0.250.0060.00515.54
7.0.240.0020.00915.67
7.0.230.0020.01015.51
7.0.220.0060.00515.78
7.0.210.0020.00815.67
7.0.200.0070.00816.19
7.0.190.0060.00515.52
7.0.180.0030.00715.55
7.0.170.0090.00515.59
7.0.160.0080.00515.62
7.0.150.0030.00915.75
7.0.140.0070.02417.84
7.0.130.0040.00815.82
7.0.120.0040.00615.58
7.0.110.0080.00515.49
7.0.100.0200.02917.02
7.0.90.0130.03517.13
7.0.80.0200.02717.08
7.0.70.0180.02916.99
7.0.60.0110.02417.18
7.0.50.0190.02617.22
7.0.40.0060.03215.92
7.0.30.0080.03215.81
7.0.20.0080.03315.91
7.0.10.0040.03415.93
7.0.00.0100.03215.71
5.6.400.0070.00714.51
5.6.390.0080.00414.79
5.6.380.0020.01214.59
5.6.370.0050.00614.43
5.6.360.0040.00614.77
5.6.350.0070.00514.68
5.6.340.0040.00914.69
5.6.330.0000.01414.59
5.6.320.0050.00814.54
5.6.310.0070.00714.72
5.6.300.0020.00914.27
5.6.290.0100.00314.68
5.6.280.0090.02516.71
5.6.270.0070.00514.44
5.6.260.0040.00614.30
5.6.250.0060.02716.50
5.6.240.0050.03016.69
5.6.230.0060.02116.73
5.6.220.0070.02716.45
5.6.210.0090.02216.56
5.6.200.0050.01716.60
5.6.190.0100.02416.83
5.6.180.0070.03316.58
5.6.170.0110.02916.52
5.6.160.0050.02116.67
5.6.150.0080.03016.63
5.6.140.0120.03016.85
5.6.130.0030.03616.75
5.6.120.0070.02516.63
5.6.110.0090.03016.69
5.6.100.0120.02616.70
5.6.90.0020.02116.63
5.6.80.0060.01616.38
5.6.70.0090.02116.36
5.6.60.0070.02916.40
5.6.50.0060.03216.47
5.6.40.0020.02016.38
5.6.30.0070.03216.40
5.6.20.0040.03316.46
5.6.10.0050.02616.46
5.6.00.0090.03016.40
5.5.380.0040.03116.51
5.5.370.0100.03116.50
5.5.360.0080.03016.35
5.5.350.0060.01816.43
5.5.340.0050.03116.54
5.5.330.0100.01816.64
5.5.320.0030.03416.55
5.5.310.0070.03516.42
5.5.300.0090.02816.63
5.5.290.0080.03216.54
5.5.280.0100.02616.49
5.5.270.0020.02316.65
5.5.260.0070.03216.41
5.5.250.0040.03316.52
5.5.240.0120.02716.38
5.5.230.0060.03416.37
5.5.220.0070.03316.34
5.5.210.0060.02816.23
5.5.200.0100.02916.27
5.5.190.0070.02016.30
5.5.180.0070.03016.18
5.5.170.0090.00614.21
5.5.160.0070.03116.21
5.5.150.0060.01916.26
5.5.140.0060.02816.23
5.5.130.0080.02916.33
5.5.120.0050.03116.44
5.5.110.0100.02816.25
5.5.100.0120.02116.22
5.5.90.0040.02816.39
5.5.80.0090.02716.22
5.5.70.0050.03316.27
5.5.60.0030.02116.04
5.5.50.0070.01716.09
5.5.40.0040.02416.17
5.5.30.0060.02516.19
5.5.20.0040.03416.14
5.5.10.0080.02816.41
5.5.00.0100.02516.21
5.4.450.0050.03214.07
5.4.440.0050.02814.04
5.4.430.0050.02513.76
5.4.420.0020.02414.16
5.4.410.0060.01614.00
5.4.400.0090.01814.03
5.4.390.0040.01713.87
5.4.380.0070.02513.86
5.4.370.0050.03013.69
5.4.360.0020.01713.88
5.4.350.0080.02713.89
5.4.340.0080.02613.81
5.4.330.0060.00311.45
5.4.320.0070.01913.97
5.4.310.0060.02313.96
5.4.300.0050.03013.94
5.4.290.0050.01813.93
5.4.280.0050.03313.89
5.4.270.0070.01613.87
5.4.260.0030.02813.82
5.4.250.0040.03013.93
5.4.240.0020.02213.76
5.4.230.0010.02113.74
5.4.220.0050.02814.03
5.4.210.0060.02913.91
5.4.200.0070.02713.73
5.4.190.0050.03013.91
5.4.180.0050.03113.88
5.4.170.0040.01613.75
5.4.160.0060.02913.75
5.4.150.0090.02713.78
5.4.140.0060.02512.93
5.4.130.0040.02013.18
5.4.120.0120.01912.88
5.4.110.0060.03112.87
5.4.100.0040.02112.92
5.4.90.0100.02812.87
5.4.80.0030.02612.85
5.4.70.0060.02712.95
5.4.60.0060.02912.79
5.4.50.0020.03212.99
5.4.40.0050.02012.99
5.4.30.0070.01512.90
5.4.20.0040.03012.99
5.4.10.0030.01812.90
5.4.00.0060.01812.76
5.3.290.0100.06714.64
5.3.280.0070.08314.74
5.3.270.0030.04014.74
5.3.260.0070.07714.72
5.3.250.0030.07714.70
5.3.240.0130.06714.57
5.3.230.0030.05714.65
5.3.220.0100.03714.55
5.3.210.0030.07714.55
5.3.200.0030.07714.67
5.3.190.0170.07314.70
5.3.180.0130.04314.67
5.3.170.0070.04314.48
5.3.160.0130.06314.57
5.3.150.0100.07014.58
5.3.140.0070.03714.48
5.3.130.0070.08014.61
5.3.120.0100.04314.61
5.3.110.0030.07714.65
5.3.100.0000.04714.18
5.3.90.0070.04014.02
5.3.80.0030.08014.04
5.3.70.0130.07014.08
5.3.60.0070.06714.02
5.3.50.0030.08013.87
5.3.40.0030.08014.01
5.3.30.0000.07713.91
5.3.20.0030.05313.75
5.3.10.0130.06713.71
5.3.00.0100.06713.68
5.2.170.0070.05311.30
5.2.160.0000.04311.30
5.2.150.0030.06711.30
5.2.140.0030.04711.30
5.2.130.0130.05711.30
5.2.120.0100.06011.30
5.2.110.0100.05711.30
5.2.100.0130.04311.30
5.2.90.0100.06011.30
5.2.80.0030.06011.30
5.2.70.0070.04711.30
5.2.60.0070.02711.30
5.2.50.0030.06011.30
5.2.40.0000.04011.30
5.2.30.0070.02711.30
5.2.20.0070.02711.30
5.2.10.0030.06311.30
5.2.00.0100.05711.30
5.1.60.0030.05011.30
5.1.50.0000.06011.30
5.1.40.0000.06011.30
5.1.30.0000.05011.30
5.1.20.0000.06011.30
5.1.10.0030.05711.30
5.1.00.0070.04711.30
5.0.50.0030.04311.30
5.0.40.0070.04011.30
5.0.30.0000.06711.30
5.0.20.0070.03711.30
5.0.10.0000.04711.30
5.0.00.0100.06011.30
4.4.90.0000.01711.30
4.4.80.0000.03711.30
4.4.70.0030.02011.30
4.4.60.0100.03011.30
4.4.50.0000.03311.30
4.4.40.0030.04711.30
4.4.30.0030.01711.30
4.4.20.0030.03711.30
4.4.10.0030.03711.30
4.4.00.0000.05311.30
4.3.110.0000.03711.30
4.3.100.0000.03711.30
4.3.90.0030.03311.30
4.3.80.0030.05311.30
4.3.70.0030.03711.30
4.3.60.0000.03311.30
4.3.50.0000.03311.30
4.3.40.0000.04711.30
4.3.30.0000.03311.30
4.3.20.0000.02711.30
4.3.10.0000.03711.30
4.3.00.0000.03011.30

preferences:
67.13 ms | 401 KiB | 5 Q