3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uri = 'administrator/clients/client/11'; // function input $routes = array( 'administrator/clients' => 'administrator/clients', 'administrator/client/(:num)' => 'administrator/clients/client/$1/$2', ); foreach ($routes as $route => $controller) { if (preg_match('/\$\d+/', $controller, $matches)) { //if (preg_match_all('/\$\d+/', $controller, $matches)) { // multi-parametre $tmp = $route; foreach ($matches as $match) { var_dump($match); $uri1[] = preg_replace('/\(\:\w+\)/', '\\' . $match, $tmp); } } } var_dump($uri1);

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.0100.01016.88
8.3.60.0070.00716.63
8.3.50.0120.00522.11
8.3.40.0060.00918.89
8.3.30.0070.00719.04
8.3.20.0050.00320.16
8.3.10.0040.00423.66
8.3.00.0030.00519.68
8.2.180.0120.00317.00
8.2.170.0060.01522.96
8.2.160.0070.00720.47
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00019.61
8.2.110.0140.00722.32
8.2.100.0060.00619.14
8.2.90.0000.00817.88
8.2.80.0000.00817.97
8.2.70.0000.00818.04
8.2.60.0040.00418.22
8.2.50.0000.00718.10
8.2.40.0090.00019.94
8.2.30.0040.00418.26
8.2.20.0000.00717.76
8.2.10.0050.00218.19
8.2.00.0040.00417.98
8.1.280.0140.00025.92
8.1.270.0130.00324.01
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00423.92
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0050.00517.48
8.1.190.0030.00617.35
8.1.180.0040.00418.10
8.1.170.0080.00418.64
8.1.160.0030.00322.07
8.1.150.0040.00418.80
8.1.140.0040.00417.50
8.1.130.0040.00417.76
8.1.120.0000.00717.53
8.1.110.0000.00717.50
8.1.100.0000.00717.51
8.1.90.0070.00017.52
8.1.80.0040.00417.63
8.1.70.0030.00317.53
8.1.60.0040.00417.75
8.1.50.0050.00317.65
8.1.40.0000.00917.65
8.1.30.0030.00517.79
8.1.20.0040.00417.77
8.1.10.0070.00017.63
8.1.00.0020.00517.59
8.0.300.0000.00719.76
8.0.290.0050.00316.88
8.0.280.0020.00518.44
8.0.270.0000.00717.19
8.0.260.0030.00517.26
8.0.250.0000.00717.09
8.0.240.0000.00816.98
8.0.230.0050.00416.95
8.0.220.0030.00316.93
8.0.210.0040.00417.00
8.0.200.0000.00617.07
8.0.190.0030.00317.04
8.0.180.0040.00417.09
8.0.170.0050.00316.94
8.0.160.0040.00417.09
8.0.150.0040.00416.98
8.0.140.0050.00316.90
8.0.130.0030.00313.49
8.0.120.0040.00416.89
8.0.110.0000.00717.02
8.0.100.0040.00416.85
8.0.90.0040.00417.01
8.0.80.0060.01016.95
8.0.70.0000.00816.98
8.0.60.0040.00416.82
8.0.50.0000.00816.93
8.0.30.0050.01317.27
8.0.20.0150.00817.40
8.0.10.0000.00717.21
8.0.00.0150.00716.82
7.4.330.0020.00215.08
7.4.320.0080.00016.69
7.4.300.0060.00016.70
7.4.290.0000.00716.77
7.4.280.0040.00416.74
7.4.270.0030.00316.68
7.4.260.0060.00316.70
7.4.250.0000.00716.69
7.4.240.0040.00316.75
7.4.230.0050.00316.54
7.4.220.0120.00616.69
7.4.210.0080.00616.84
7.4.200.0060.00316.64
7.4.160.0060.01016.78
7.4.150.0120.00817.40
7.4.140.0060.01217.86
7.4.130.0080.00816.76
7.4.120.0140.00616.76
7.4.110.0070.01016.79
7.4.100.0110.01116.74
7.4.90.0170.00416.71
7.4.80.0070.01719.39
7.4.70.0030.01316.69
7.4.60.0100.00716.75
7.4.50.0000.00516.77
7.4.40.0130.01016.68
7.4.30.0110.00716.70
7.4.00.0040.01114.90
7.3.330.0050.00013.20
7.3.320.0060.00013.31
7.3.310.0040.00416.56
7.3.300.0000.00716.31
7.3.290.0080.00616.43
7.3.280.0090.01116.45
7.3.270.0090.01017.40
7.3.260.0180.00316.63
7.3.250.0110.00616.55
7.3.240.0060.01216.59
7.3.230.0120.00316.62
7.3.210.0050.01316.50
7.3.200.0120.00419.39
7.3.190.0100.00616.58
7.3.180.0130.00816.70
7.3.170.0080.00816.64
7.3.160.0060.01016.49
7.3.120.0100.00714.97
7.3.10.0160.00616.77
7.3.00.0090.01716.54
7.2.330.0190.00316.83
7.2.320.0160.00616.86
7.2.310.0030.01416.71
7.2.300.0120.00416.73
7.2.290.0100.00616.87
7.2.130.0160.00616.53
7.2.120.0070.01016.41
7.2.110.0110.01416.48
7.2.100.0100.01316.64
7.2.90.0060.01216.30
7.2.80.0220.00616.61
7.2.70.0170.00616.46
7.2.60.0110.00616.87
7.2.50.0130.00916.36
7.2.40.0170.00616.44
7.2.30.0100.01016.78
7.2.20.0190.01116.41
7.2.10.0160.01516.45
7.2.00.0080.00918.11
7.1.250.0180.00815.59
7.1.200.0220.00915.64
7.1.100.0060.00918.64
7.1.70.0000.00717.30
7.1.60.0070.01719.70
7.1.50.0140.01017.15
7.1.00.0030.07722.30
7.0.200.0120.00416.77
7.0.140.0030.07322.19
7.0.60.0070.06720.00
7.0.50.0100.07717.81
7.0.40.0100.08719.98
7.0.30.0100.04720.35
7.0.20.0270.05320.12
7.0.10.0070.07320.14
7.0.00.0070.08720.22
5.6.280.0100.06721.05
5.6.210.0130.04720.52
5.6.200.0100.08318.08
5.6.190.0070.03720.35
5.6.180.0670.05720.63
5.6.170.0300.07320.53
5.6.160.0030.05320.50
5.6.150.0100.07718.16
5.6.140.0130.07018.18
5.6.130.0030.04018.15
5.6.120.0070.07021.02
5.6.110.0000.08720.96
5.6.100.0100.06721.10
5.6.90.0170.04720.98
5.6.80.0070.06320.51
5.5.350.0300.07020.46
5.5.340.0070.03717.97
5.5.330.0070.03720.25
5.5.320.0070.04020.29
5.5.310.0230.03320.29
5.5.300.0030.05317.90
5.5.290.0070.04717.95
5.5.280.0130.06320.76
5.5.270.0100.05720.96
5.5.260.0130.08020.89
5.5.250.0030.06720.59
5.5.240.0300.06720.29
5.4.450.0800.06019.63
5.4.440.1070.05019.63
5.4.430.1200.05319.27
5.4.420.0100.05319.61
5.4.410.0970.04719.34
5.4.400.1000.04018.92
5.4.390.1070.06718.78
5.4.380.0100.05718.60
5.4.370.0130.05318.55
5.4.360.0130.05018.61
5.4.350.0100.06018.66
5.4.340.0230.04718.66
5.4.320.0040.04512.46
5.4.310.0090.04312.45
5.4.300.0070.04012.46
5.4.290.0070.04012.45
5.4.280.0070.03712.35
5.4.270.0080.03412.35
5.4.260.0100.04612.35
5.4.250.0080.04012.35
5.4.240.0050.03712.35
5.4.230.0080.03812.34
5.4.220.0060.03712.34
5.4.210.0060.03512.34
5.4.200.0070.03512.34
5.4.190.0040.03812.34
5.4.180.0040.04012.34
5.4.170.0060.03812.35
5.4.160.0060.04112.35
5.4.150.0030.04012.34
5.4.140.0070.03712.02
5.4.130.0080.03412.01
5.4.120.0060.03511.97
5.4.110.0060.03511.96
5.4.100.0050.04811.97
5.4.90.0080.04211.97
5.4.80.0040.03911.96
5.4.70.0080.03411.96
5.4.60.0030.03811.96
5.4.50.0050.03911.96
5.4.40.0080.03311.95
5.4.30.0080.03711.95
5.4.20.0080.03711.95
5.4.10.0080.03811.95
5.4.00.0090.03411.44
5.3.290.0100.05312.80
5.3.280.0080.03612.71
5.3.270.0060.04312.72
5.3.260.0110.03412.72
5.3.250.0070.04212.72
5.3.240.0040.03912.72
5.3.230.0100.03712.71
5.3.220.0080.03512.68
5.3.210.0060.04212.68
5.3.200.0060.03612.68
5.3.190.0060.04212.68
5.3.180.0010.04412.68
5.3.170.0090.04212.67
5.3.160.0050.03712.68
5.3.150.0050.03712.67
5.3.140.0080.04112.66
5.3.130.0060.03812.66
5.3.120.0080.04412.66
5.3.110.0080.03612.66
5.3.100.0100.03712.12
5.3.90.0060.03512.08
5.3.80.0100.03812.08
5.3.70.0060.03912.07
5.3.60.0080.03412.06
5.3.50.0110.03712.00
5.3.40.0050.03712.00
5.3.30.0060.03411.97
5.3.20.0080.03311.73
5.3.10.0100.03111.70
5.3.00.0050.03711.69
5.2.170.0070.0299.19
5.2.160.0050.0359.19
5.2.150.0040.0379.20
5.2.140.0050.0389.19
5.2.130.0050.0319.15
5.2.120.0030.0309.15
5.2.110.0060.0379.16
5.2.100.0070.0269.15
5.2.90.0070.0269.15
5.2.80.0050.0329.14
5.2.70.0030.0329.14
5.2.60.0080.0279.10
5.2.50.0060.0299.07
5.2.40.0080.0259.05
5.2.30.0040.0419.02
5.2.20.0040.0349.01
5.2.10.0020.0308.92
5.2.00.0040.0298.78
5.1.60.0060.0228.06
5.1.50.0050.0248.06
5.1.40.0070.0228.04
5.1.30.0070.0238.39
5.1.20.0020.0288.41
5.1.10.0060.0238.14
5.1.00.0040.0258.14
5.0.50.0030.0216.61
5.0.40.0050.0246.48
5.0.30.0040.0326.29
5.0.20.0040.0196.26
5.0.10.0030.0206.24
5.0.00.0020.0326.23
4.4.90.0030.0154.78
4.4.80.0020.0164.76
4.4.70.0030.0154.75
4.4.60.0020.0164.76
4.4.50.0050.0134.77
4.4.40.0010.0274.71
4.4.30.0020.0164.76
4.4.20.0020.0164.85
4.4.10.0030.0214.85
4.4.00.0020.0264.76
4.3.110.0020.0184.67
4.3.100.0040.0194.67
4.3.90.0050.0124.64
4.3.80.0020.0254.58
4.3.70.0060.0194.63
4.3.60.0050.0134.63
4.3.50.0040.0224.63
4.3.40.0030.0244.54
4.3.30.0020.0173.29
4.3.20.0030.0153.26
4.3.10.0050.0193.22
4.3.00.0030.02043.77

preferences:
47.77 ms | 401 KiB | 5 Q