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/*/sub/*' ); $patternParts = explode($wildcard, $urlParts['path']); foreach ($patternParts as &$pPart) { $pPart = preg_quote($pPart, '/'); } unset($pPart); var_dump($patternParts); //Случай, когда * находится в конце строки - возможны любые вложенные пути if ($patternParts[count($patternParts)-1] == '') { 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'; var_dump($pattern);

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.00916.50
8.3.50.0110.00921.97
8.3.40.0100.00718.79
8.3.30.0090.01219.11
8.3.20.0030.00520.27
8.3.10.0040.00423.36
8.3.00.0000.00819.19
8.2.180.0070.01116.32
8.2.170.0110.00422.96
8.2.160.0070.00720.34
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00826.16
8.2.120.0080.00020.90
8.2.110.0080.00022.37
8.2.100.0090.00317.91
8.2.90.0000.00719.21
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0040.00719.51
8.2.50.0030.00618.07
8.2.40.0040.00421.09
8.2.30.0000.00718.29
8.2.20.0040.00417.80
8.2.10.0030.00618.13
8.2.00.0020.00517.81
8.1.280.0090.00625.92
8.1.270.0120.00623.91
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0040.00422.00
8.1.230.0000.01219.05
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0000.00818.54
8.1.160.0040.00422.02
8.1.150.0040.00418.64
8.1.140.0000.00717.35
8.1.130.0070.00017.84
8.1.120.0030.00317.45
8.1.110.0000.00717.46
8.1.100.0040.00417.45
8.1.90.0080.00017.42
8.1.80.0030.00517.43
8.1.70.0000.00817.43
8.1.60.0030.00617.46
8.1.50.0050.00317.51
8.1.40.0050.00317.39
8.1.30.0030.00517.59
8.1.20.0040.00417.54
8.1.10.0090.00017.57
8.1.00.0000.00717.40
8.0.300.0040.00418.77
8.0.290.0070.00017.16
8.0.280.0050.00218.39
8.0.270.0050.00217.25
8.0.260.0030.00317.25
8.0.250.0070.00016.84
8.0.240.0040.00416.99
8.0.230.0030.00316.93
8.0.220.0030.00516.87
8.0.210.0030.00316.77
8.0.200.0030.00316.88
8.0.190.0040.00416.88
8.0.180.0030.00516.92
8.0.170.0040.00416.79
8.0.160.0030.00316.96
8.0.150.0050.00316.86
8.0.140.0000.00716.91
8.0.130.0000.00513.41
8.0.120.0060.00316.86
8.0.110.0070.00016.86
8.0.100.0000.00716.74
8.0.90.0050.00316.91
8.0.80.0110.00416.85
8.0.70.0000.00716.90
8.0.60.0040.00416.77
8.0.50.0070.00016.71
8.0.30.0100.00817.13
8.0.20.0090.00917.40
8.0.10.0070.00016.91
8.0.00.0110.00716.93
7.4.330.0020.00515.00
7.4.320.0040.00416.61
7.4.300.0040.00416.55
7.4.290.0080.00016.51
7.4.280.0060.00316.55
7.4.270.0030.00316.52
7.4.260.0000.00616.48
7.4.250.0000.00816.45
7.4.240.0040.00316.59
7.4.230.0030.00316.55
7.4.220.0000.01816.46
7.4.210.0110.00716.66
7.4.200.0000.00716.63
7.4.190.0070.00016.36
7.4.160.0140.00316.29
7.4.150.0060.01317.40
7.4.140.0120.01017.86
7.4.130.0110.00616.44
7.4.120.0090.00916.44
7.4.110.0110.00716.66
7.4.100.0060.01216.45
7.4.90.0130.00516.43
7.4.80.0070.01419.39
7.4.70.0040.01316.57
7.4.60.0100.00716.57
7.4.50.0050.00316.68
7.4.40.0090.00916.52
7.4.30.0040.01216.55
7.4.00.0080.01014.92
7.3.330.0060.00013.25
7.3.320.0060.00013.12
7.3.310.0000.00716.41
7.3.300.0030.00316.35
7.3.290.0070.00716.25
7.3.280.0070.01216.26
7.3.270.0100.00717.40
7.3.260.0180.00716.54
7.3.250.0180.00216.33
7.3.240.0140.00916.51
7.3.230.0130.00716.39
7.3.210.0140.00716.42
7.3.200.0030.01319.39
7.3.190.0070.01416.29
7.3.180.0100.00716.38
7.3.170.0100.00716.62
7.3.160.0120.00416.55
7.3.120.0080.01014.73
7.3.110.0090.00514.95
7.3.100.0060.00914.49
7.3.90.0070.00514.83
7.3.80.0050.01014.91
7.3.70.0040.00914.82
7.3.60.0070.00514.64
7.3.50.0070.00514.61
7.3.40.0030.01014.85
7.3.30.0030.00614.83
7.3.20.0030.00916.68
7.3.10.0040.00916.58
7.3.00.0060.00816.69
7.2.330.0130.00416.82
7.2.320.0090.01316.78
7.2.310.0150.00916.56
7.2.300.0030.01316.61
7.2.290.0130.00316.65
7.2.250.0080.01015.11
7.2.240.0100.00915.15
7.2.230.0070.00815.10
7.2.220.0020.00915.14
7.2.210.0020.01015.29
7.2.200.0030.01015.06
7.2.190.0020.00915.04
7.2.180.0090.00815.02
7.2.170.0060.00514.98
7.2.130.0060.00616.96
7.2.120.0030.00716.96
7.2.110.0090.00616.94
7.2.100.0000.00916.90
7.2.90.0080.00816.75
7.2.80.0040.00417.12
7.2.70.0000.01116.87
7.2.60.0070.00916.90
7.2.50.0000.00917.03
7.2.40.0000.01616.94
7.2.30.0030.01317.05
7.2.20.0100.00717.14
7.2.10.0070.00316.93
7.2.00.0050.00817.92
7.1.330.0060.00715.85
7.1.320.0050.00715.76
7.1.310.0030.01015.71
7.1.300.0030.00615.88
7.1.290.0080.00515.74
7.1.280.0050.01115.79
7.1.270.0080.00215.91
7.1.260.0060.00615.77
7.1.250.0060.00315.94
7.1.200.0100.00315.77
7.1.100.0030.00718.11
7.1.70.0000.00917.30
7.1.60.0090.01219.46
7.1.50.0100.01017.10
7.1.00.0030.07322.30
7.0.200.0080.00516.79
7.0.140.0000.07322.08
7.0.60.0030.06020.01
7.0.50.0000.07317.75
7.0.40.0170.07020.00
7.0.30.0300.04320.02
7.0.20.0330.07720.13
7.0.10.0030.04720.09
7.0.00.0170.07720.19
5.6.280.0000.07320.78
5.6.210.0170.07320.50
5.6.200.0030.08318.17
5.6.190.0130.08320.39
5.6.180.0270.05320.56
5.6.170.0370.06720.41
5.6.160.0030.04020.37
5.6.150.0070.03718.18
5.6.140.0030.05018.15
5.6.130.0200.06718.21
5.6.120.0100.08320.98
5.6.110.0070.07020.99
5.6.100.0100.07020.93
5.6.90.0070.03720.97
5.6.80.0030.07320.38
5.5.350.4270.04020.37
5.5.340.0130.06718.00
5.5.330.0100.08020.57
5.5.320.0000.09020.50
5.5.310.0130.04720.33
5.5.300.0070.07317.95
5.5.290.0070.08318.02
5.5.280.0030.08720.87
5.5.270.0130.07720.79
5.5.260.0100.08720.86
5.5.250.0130.05720.70
5.5.240.0330.04020.10
5.4.450.3270.04019.41
5.4.440.3030.04319.54
5.4.430.2970.04019.40
5.4.420.3470.04319.42
5.4.410.3830.03719.28
5.4.400.3730.04019.10
5.4.390.3270.04319.09
5.4.380.3070.04719.08
5.4.370.3000.03718.93
5.4.360.3930.03719.09
5.4.350.2930.03318.93
5.4.340.2930.03719.16
5.4.320.0170.06019.25
5.4.310.2930.04319.24
5.4.300.3130.04019.05
5.4.290.3230.03719.06
5.4.280.3270.04018.93
5.4.270.3500.04019.25
5.4.260.2930.03719.05
5.4.250.2930.04318.91
5.4.240.3330.03319.09
5.4.230.3270.03319.09
5.4.220.3000.03319.08
5.4.210.3200.03719.07
5.4.200.0030.04719.15
5.4.190.2030.05719.12
5.4.180.3570.04019.21
5.4.170.3900.03719.05
5.4.160.3270.03319.11
5.4.150.3230.05019.07
5.4.140.3670.03316.36
5.4.130.3270.03316.27
5.4.120.3800.04016.29
5.4.110.3030.04316.39
5.4.100.3200.03316.34
5.4.90.3200.03716.43
5.4.80.3030.03716.38
5.4.70.3270.03716.39
5.4.60.3330.04016.36
5.4.50.3030.02716.36
5.4.40.3870.04016.49
5.4.30.3270.04016.41
5.4.20.2930.03316.45
5.4.10.3030.03716.46
5.4.00.3200.04015.62
5.3.290.0130.03714.61
5.3.280.3170.03314.52
5.3.270.3900.03714.44
5.3.260.2970.03714.45
5.3.250.3730.03714.63
5.3.240.3530.03714.55
5.3.230.3670.04014.43
5.3.220.3870.03314.43
5.3.210.3670.04014.39
5.3.200.3430.03714.65
5.3.190.3370.03714.41
5.3.180.2900.04014.42
5.3.170.3370.04014.40
5.3.160.3070.04014.45
5.3.150.3270.04014.47
5.3.140.3270.03714.41
5.3.130.3300.03014.50
5.3.120.3400.04014.48
5.3.110.2900.03714.50
5.3.100.3770.04313.91
5.3.90.3970.03713.89
5.3.80.3200.04314.07
5.3.70.2900.04313.97
5.3.60.3100.04013.95
5.3.50.2900.04313.90
5.3.40.3900.03314.04
5.3.30.3770.03713.70
5.3.20.3800.03313.61
5.3.10.3600.03313.43
5.3.00.3470.03313.49
5.2.170.2730.03311.08
5.2.160.3170.02711.30
5.2.150.3030.02310.99
5.2.140.3230.03010.99
5.2.130.3030.03311.12
5.2.120.3100.03010.94
5.2.110.3030.02710.94
5.2.100.3400.01711.15
5.2.90.2870.03710.96
5.2.80.3200.03011.14
5.2.70.3330.02710.96
5.2.60.3230.02711.20
5.2.50.3070.03010.88
5.2.40.2530.03310.85
5.2.30.2530.03311.01
5.2.20.2700.02710.79
5.2.10.2630.03010.91
5.2.00.2470.03710.63
5.1.60.2570.03010.21
5.1.50.2170.03010.21
5.1.40.1930.03010.21
5.1.30.2000.02310.44
5.1.20.2200.02710.46
5.1.10.2070.02310.21
5.1.00.2170.02710.21
5.0.50.1270.01710.21
5.0.40.1170.03310.21
5.0.30.1070.02710.21
5.0.20.1230.02710.21
5.0.10.1030.02010.21
5.0.00.1330.03010.21
4.4.90.1470.01710.21
4.4.80.1330.01010.21
4.4.70.1400.01710.21
4.4.60.1400.01010.21
4.4.50.1500.01710.21
4.4.40.1330.03010.21
4.4.30.1230.02310.21
4.4.20.1230.01710.21
4.4.10.1200.01710.21
4.4.00.1000.02010.21
4.3.110.1270.02310.21
4.3.100.1170.02010.21
4.3.90.1130.01710.21
4.3.80.0970.02710.21
4.3.70.1170.02010.21
4.3.60.1230.02010.21
4.3.50.1270.02710.21
4.3.40.1170.03010.21
4.3.30.0600.02710.21
4.3.20.0630.01710.21
4.3.10.0630.02310.21
4.3.00.0500.02010.21

preferences:
65.93 ms | 401 KiB | 5 Q