3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(simplified_fnmatch('/lejebolig/*.html', 'lejebolig/1.html')); function simplified_fnmatch($pattern, $string) { // fnmatch is a function available on linux systems, which sees if a $pattern string with wildcards matches a string, using linux shell rules // the simplified_fnmatch function escapes ?,[], and {} characters, so as to only apply the * wildcard // it also uses the FNM_CASEFOLD flag, since in URLs case does not matter $escaped_pattern = ''; for ($i = 0; $i < strlen($pattern); $i++) { if (($pattern[$i] == '?') || ($pattern[$i] == '[') || ($pattern[$i] == ']') || ($pattern[$i] == '{') || ($pattern[$i] == '}')) $escaped_pattern .= '\\'; $escaped_pattern .= $pattern[$i]; } return fnmatch($escaped_pattern, $string, FNM_CASEFOLD); }

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.70.0110.00416.75
8.3.60.0030.01416.75
8.3.50.0030.01216.71
8.3.40.0040.01118.64
8.3.30.0070.00718.82
8.3.20.0000.00720.38
8.3.10.0080.00021.85
8.3.00.0040.00420.89
8.2.180.0140.00718.11
8.2.170.0070.01022.96
8.2.160.0100.00322.15
8.2.150.0030.01024.18
8.2.140.0050.00324.66
8.2.130.0070.00022.28
8.2.120.0060.00326.35
8.2.110.0050.00520.51
8.2.100.0040.00818.03
8.2.90.0080.00019.34
8.2.80.0080.00017.97
8.2.70.0060.00317.38
8.2.60.0030.00717.80
8.2.50.0000.00918.10
8.2.40.0030.00620.48
8.2.30.0030.00521.07
8.2.20.0050.00218.08
8.2.10.0040.00418.14
8.2.00.0020.00518.21
8.1.280.0100.00725.92
8.1.270.0080.00023.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00922.13
8.1.230.0110.00419.01
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0040.00817.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.75
8.1.160.0030.00619.14
8.1.150.0050.00318.88
8.1.140.0070.00019.66
8.1.130.0030.00318.97
8.1.120.0040.00417.43
8.1.110.0040.00417.55
8.1.100.0040.00417.52
8.1.90.0020.00517.53
8.1.80.0040.00417.37
8.1.70.0030.00317.38
8.1.60.0060.00317.68
8.1.50.0000.00817.41
8.1.40.0000.00817.61
8.1.30.0000.00717.74
8.1.20.0000.00917.61
8.1.10.0000.00817.71
8.1.00.0000.00817.59
8.0.300.0020.00519.89
8.0.290.0000.00816.63
8.0.280.0040.00418.54
8.0.270.0000.00717.22
8.0.260.0030.00316.82
8.0.250.0000.00717.02
8.0.240.0000.00716.77
8.0.230.0000.00716.95
8.0.220.0070.00017.00
8.0.210.0040.00416.82
8.0.200.0030.00316.91
8.0.190.0060.00316.89
8.0.180.0090.00316.91
8.0.170.0030.00316.84
8.0.160.0060.00317.02
8.0.150.0080.00016.79
8.0.140.0040.00416.77
8.0.130.0060.00313.32
8.0.120.0000.00816.90
8.0.110.0000.00716.93
8.0.100.0050.00316.73
8.0.90.0070.00016.80
8.0.80.0090.00616.93
8.0.70.0040.00416.99
8.0.60.0040.00417.00
8.0.50.0000.00717.03
8.0.30.0090.01017.25
8.0.20.0140.00417.44
8.0.10.0000.00816.92
8.0.00.0100.01916.73
7.4.330.0060.00015.55
7.4.320.0030.00316.58
7.4.300.0030.00316.55
7.4.290.0040.00416.51
7.4.280.0050.00316.66
7.4.270.0040.00416.66
7.4.260.0000.00716.66
7.4.250.0070.00016.61
7.4.240.0040.00416.61
7.4.230.0020.00516.32
7.4.220.0070.01216.49
7.4.210.0030.01116.60
7.4.200.0000.00716.50
7.4.160.0110.00616.53
7.4.150.0120.00617.40
7.4.140.0090.01017.86
7.4.130.0050.01416.69
7.4.120.0100.00916.59
7.4.110.0090.00916.68
7.4.100.0090.00916.50
7.4.90.0030.01416.64
7.4.80.0040.01419.39
7.4.70.0130.00316.62
7.4.60.0030.01316.61
7.4.50.0000.01416.18
7.4.40.0060.01216.80
7.4.30.0030.01316.66
7.4.00.0000.01614.63
7.3.330.0000.00613.25
7.3.320.0000.00513.14
7.3.310.0060.00316.28
7.3.300.0070.00016.46
7.3.290.0080.00616.42
7.3.280.0090.00816.41
7.3.270.0030.01917.40
7.3.260.0090.00816.63
7.3.250.0080.00916.49
7.3.240.0100.00716.48
7.3.230.0070.01116.34
7.3.210.0090.00916.48
7.3.200.0060.00916.46
7.3.190.0130.00316.74
7.3.180.0100.00616.30
7.3.170.0040.01116.36
7.3.160.0000.01616.52
7.2.330.0040.01216.86
7.2.320.0150.00816.55
7.2.310.0130.00916.37
7.2.300.0060.01516.57
7.2.290.0060.01216.63
7.2.60.0000.01516.70
7.2.00.0030.01419.57
7.1.200.0100.00315.86
7.1.100.0000.01518.15
7.1.70.0060.00317.30
7.1.60.0300.01033.35
7.1.50.0730.00733.04
7.1.40.0530.01032.53
7.1.30.0670.01032.82
7.1.20.0200.02332.97
7.1.10.0570.01014.69
7.1.00.0770.00714.92
7.0.200.0100.00715.08
7.0.190.0630.00714.92
7.0.180.0500.00714.70
7.0.170.0530.00714.61
7.0.160.0470.01314.56
7.0.150.0530.00714.65
7.0.140.0570.00714.73
7.0.130.0500.00714.71
7.0.120.0470.01014.86
7.0.110.0470.01014.76
7.0.100.0730.00714.46
7.0.90.0430.01014.52
7.0.80.0530.02014.62
7.0.70.0530.01014.55
7.0.60.0470.01314.40
7.0.50.0430.01014.57
7.0.40.0470.01014.79
7.0.30.0400.01014.75
7.0.20.0530.01314.52
7.0.10.0630.00714.52
7.0.00.0630.00714.67

preferences:
39.1 ms | 401 KiB | 5 Q