3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $wildcard = '*'; $urlParts = array( 'path' => 'example.com/sub/path/wildcard/*' ); $patternParts = explode($wildcard, $urlParts['path']); foreach ($patternParts as &$pPart) { $pPart = preg_quote($pPart, '/'); } unset($pPart); //Случай, когда * находится в конце строки - возможны любые вложенные пути if ($patternParts[count($patternParts)] = '') { array_pop($patternParts); if (count($patternParts) > 1) { $pattern = implode('\w+', $patternParts); } else { $pattern = $patternParts[0]; } $pattern.= '[\w\/]+'; } else { $pattern = implode('\w+', $patternParts); } $pattern = '/^' . $pattern . '$/im';

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.0150.00016.50
8.3.50.0100.00917.31
8.3.40.0090.00618.82
8.3.30.0120.00918.63
8.3.20.0130.00618.68
8.3.10.0000.00820.64
8.3.00.0120.00319.26
8.2.180.0100.01016.75
8.2.170.0160.00722.96
8.2.160.0130.00722.25
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0090.00018.03
8.2.110.0100.00019.45
8.2.100.0110.00017.72
8.2.90.0050.00317.75
8.2.80.0060.00317.97
8.2.70.0040.00417.68
8.2.60.0030.00618.28
8.2.50.0040.00818.10
8.2.40.0080.00021.07
8.2.30.0050.00319.36
8.2.20.0070.00017.62
8.2.10.0090.00017.61
8.2.00.0000.00717.64
8.1.280.0070.01025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0140.00420.85
8.1.230.0080.00417.95
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0080.00018.52
8.1.160.0070.00018.93
8.1.150.0040.00418.76
8.1.140.0040.00417.46
8.1.130.0040.00417.76
8.1.120.0030.00317.51
8.1.110.0040.00417.36
8.1.100.0000.00817.46
8.1.90.0040.00417.45
8.1.80.0000.00717.36
8.1.70.0000.00717.33
8.1.60.0040.00417.52
8.1.50.0000.00917.51
8.1.40.0000.00817.52
8.1.30.0040.00417.60
8.1.20.0030.00517.50
8.1.10.0000.00817.64
8.1.00.0040.00417.45
8.0.300.0050.00218.77
8.0.290.0090.00016.75
8.0.280.0000.00818.48
8.0.270.0040.00417.27
8.0.260.0000.00816.73
8.0.250.0080.00316.85
8.0.240.0030.00716.94
8.0.230.0030.00516.84
8.0.220.0000.00716.86
8.0.210.0030.00316.95
8.0.200.0030.00316.94
8.0.190.0040.00416.84
8.0.180.0000.00816.80
8.0.170.0040.00416.78
8.0.160.0000.00716.91
8.0.150.0000.00816.73
8.0.140.0050.00316.83
8.0.130.0000.00713.29
8.0.120.0000.00716.87
8.0.110.0030.00316.83
8.0.100.0080.00016.73
8.0.90.0040.00416.75
8.0.80.0090.00616.86
8.0.70.0040.00416.69
8.0.60.0000.00716.69
8.0.50.0040.00416.85
8.0.30.0050.01317.08
8.0.20.0090.01117.15
8.0.10.0030.00516.87
8.0.00.0100.01016.87
7.4.330.0000.00512.94
7.4.320.0030.00516.64
7.4.300.0040.00416.40
7.4.290.0030.00316.53
7.4.280.0060.00316.58
7.4.270.0000.00616.61
7.4.260.0030.00313.22
7.4.250.0040.00416.48
7.4.240.0000.00716.65
7.4.230.0000.00716.25
7.4.220.0090.00616.46
7.4.210.0050.01116.63
7.4.200.0000.00716.70
7.4.190.0080.00016.45
7.4.160.0150.00316.44
7.4.150.0070.01116.38
7.4.140.0090.00916.54
7.4.130.0080.00816.59
7.4.120.0080.00916.58
7.4.110.0110.00716.57
7.4.100.0070.01016.59
7.4.90.0060.01316.56
7.4.80.0150.00416.43
7.4.70.0070.01116.68
7.4.60.0100.00716.50
7.4.50.0000.00916.53
7.4.40.0070.00316.51
7.4.30.0030.01216.51
7.4.00.0060.00814.79
7.3.330.0060.00013.05
7.3.320.0050.00013.17
7.3.310.0050.00416.37
7.3.300.0070.00016.18
7.3.290.0060.01216.34
7.3.280.0080.00816.30
7.3.270.0130.01016.70
7.3.260.0090.01016.40
7.3.250.0100.01016.44
7.3.240.0120.00616.48
7.3.230.0060.01016.59
7.3.210.0060.01216.30
7.3.200.0070.01319.39
7.3.190.0100.01016.49
7.3.180.0090.00616.27
7.3.170.0060.01316.28
7.3.160.0120.00316.43
7.3.120.0060.00814.91
7.3.110.0050.01314.89
7.3.100.0030.01314.73
7.3.90.0030.01014.75
7.3.80.0050.00814.87
7.3.70.0050.00714.85
7.3.60.0020.01314.68
7.3.50.0100.00514.73
7.3.40.0050.01014.66
7.3.30.0070.00614.78
7.3.20.0040.00616.80
7.3.10.0030.00916.62
7.3.00.0070.00716.61
7.2.330.0110.00716.75
7.2.320.0090.00916.81
7.2.310.0060.00616.60
7.2.300.0030.01416.85
7.2.290.0090.00816.85
7.2.250.0110.00715.05
7.2.240.0060.01215.13
7.2.230.0080.00814.92
7.2.220.0060.00514.95
7.2.210.0080.00415.08
7.2.200.0100.00515.00
7.2.190.0050.01015.14
7.2.180.0050.00914.77
7.2.170.0050.00915.08
7.1.330.0090.00515.76
7.1.320.0090.00515.75
7.1.310.0050.00715.92
7.1.300.0070.00415.76
7.1.290.0050.01215.55
7.1.280.0050.01115.78
7.1.270.0060.00515.67
7.1.260.0020.01215.82
7.1.100.0040.01118.22
7.1.70.0000.00717.33
7.1.60.0060.01019.40
7.1.50.0060.01216.94
7.1.00.0030.07722.35
7.0.200.0090.00316.88
7.0.140.0030.07321.97
7.0.120.0030.07022.05
7.0.60.0170.07719.88
7.0.50.0070.05017.87
7.0.40.0100.03720.23
7.0.30.0300.07720.02
7.0.20.0230.04020.00
7.0.10.0070.08720.04
7.0.00.0030.04320.11
5.6.280.0000.07321.03
5.6.210.0100.05320.48
5.6.200.0070.08018.08
5.6.190.0030.07720.37
5.6.180.0330.06020.41
5.6.170.0200.04720.49
5.6.160.0130.07320.47
5.6.150.0000.06018.22
5.6.140.0000.09018.21
5.6.130.0030.04018.11
5.6.120.0100.08020.99
5.6.110.0030.09020.97
5.6.100.0170.07720.96
5.6.90.0030.08721.00
5.6.80.0030.08720.43
5.5.350.0030.07320.43
5.5.340.0030.05717.99
5.5.330.0070.08320.28
5.5.320.0330.04320.27
5.5.310.0270.06720.33
5.5.300.0100.07018.01
5.5.290.0030.08317.88
5.5.280.0070.04720.73
5.5.270.0030.08720.79
5.5.260.0070.07720.79
5.5.250.0100.07320.65
5.5.240.0070.04320.18
5.4.450.0100.05319.51
5.4.440.0100.07319.32
5.4.430.0000.08319.20
5.4.420.0070.07319.40
5.4.410.0100.07019.15
5.4.400.0000.06019.18
5.4.390.0070.03319.17
5.4.380.0030.03718.82
5.4.370.0030.03719.16
5.4.360.0100.04018.79
5.4.350.0170.05719.02
5.4.340.0070.06318.95
5.4.320.0130.06319.14
5.4.310.0200.03719.12
5.4.300.0070.07718.91
5.4.290.0130.06718.80
5.4.280.0070.07719.11
5.4.270.0070.07018.78
5.4.260.0170.06319.08
5.4.250.0070.06719.07
5.4.240.0130.07318.78
5.4.230.0100.03719.17
5.4.220.0070.07719.15
5.4.210.0070.03719.17
5.4.200.0070.04719.16
5.4.190.0100.05719.14
5.4.180.0030.07719.07
5.4.170.0130.05018.78
5.4.160.0130.07019.05
5.4.150.0030.07019.13
5.4.140.0070.07716.44
5.4.130.0100.07016.25
5.4.120.0070.07316.47
5.4.110.0070.06316.61
5.4.100.0070.06716.17
5.4.90.0100.06316.33
5.4.80.0030.08016.21
5.4.70.0200.05716.27
5.4.60.0100.04716.28
5.4.50.0030.04316.36
5.4.40.0070.07016.12
5.4.30.0100.06716.38
5.4.20.0100.07016.24
5.4.10.0070.03316.27
5.4.00.0000.05015.78
5.3.290.0070.06314.62
5.3.280.0030.06714.46
5.3.270.0070.07014.54
5.3.260.0030.08314.54
5.3.250.0100.08014.52
5.3.240.0070.07314.62
5.3.230.0070.07314.63
5.3.220.0030.07714.51
5.3.210.0070.08014.50
5.3.200.0100.07014.52
5.3.190.0100.06314.39
5.3.180.0070.05014.65
5.3.170.0030.07714.52
5.3.160.0000.06314.49
5.3.150.0030.04714.35
5.3.140.0070.07314.48
5.3.130.0100.04714.47
5.3.120.0070.07314.39
5.3.110.0030.05014.46
5.3.100.0030.08013.96
5.3.90.0070.07714.03
5.3.80.0070.07313.95
5.3.70.0070.06313.95
5.3.60.0000.04713.82
5.3.50.0070.03713.78
5.3.40.0070.07713.88
5.3.30.0070.04313.80
5.3.20.0030.03713.61
5.3.10.0070.06313.59
5.3.00.0030.07013.48
5.2.170.0030.05011.14
5.2.160.0000.03311.00
5.2.150.0000.05311.04
5.2.140.0030.06311.08
5.2.130.0070.05710.96
5.2.120.0070.04311.26
5.2.110.0070.05711.18
5.2.100.0030.04311.00
5.2.90.0070.06011.07
5.2.80.0000.03711.05
5.2.70.0070.06711.05
5.2.60.0030.06711.13
5.2.50.0030.06310.94
5.2.40.0030.06010.89
5.2.30.0130.04310.89
5.2.20.0000.05310.80
5.2.10.0030.06310.90
5.2.00.0100.06310.70
5.1.60.0030.05710.14
5.1.50.0030.0539.99
5.1.40.0070.0479.95
5.1.30.0030.05010.36
5.1.20.0030.05010.34
5.1.10.0070.0539.91
5.1.00.0070.05010.11
5.0.50.0070.0438.73
5.0.40.0030.0438.43
5.0.30.0000.0678.23
5.0.20.0100.0278.18
5.0.10.0000.0338.33
5.0.00.0000.0608.13
4.4.90.0030.0207.68
4.4.80.0000.0307.68
4.4.70.0030.0307.68
4.4.60.0000.0407.68
4.4.50.0000.0207.68
4.4.40.0070.0507.68
4.4.30.0000.0277.68
4.4.20.0030.0237.68
4.4.10.0030.0307.68
4.4.00.0030.0577.68
4.3.110.0000.0207.68
4.3.100.0030.0337.68
4.3.90.0000.0277.68
4.3.80.0030.0537.68
4.3.70.0030.0337.68
4.3.60.0070.0337.68
4.3.50.0030.0307.68
4.3.40.0000.0507.68
4.3.30.0000.0407.68
4.3.20.0000.0307.68
4.3.10.0070.0337.68
4.3.00.0000.0377.68

preferences:
46.15 ms | 401 KiB | 5 Q