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)) { var_dump($matches); foreach ($matches as $match) { var_dump($match); $uri1[] = preg_replace('/\(\:\w+\)/', $match, $route); } } } 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.60.0120.00916.63
8.3.50.0120.00922.17
8.3.40.0090.00618.82
8.3.30.0110.00419.05
8.3.20.0040.00420.41
8.3.10.0080.00023.66
8.3.00.0030.00619.44
8.2.180.0040.01516.34
8.2.170.0100.01322.96
8.2.160.0070.00720.37
8.2.150.0080.00024.18
8.2.140.0030.01324.66
8.2.130.0040.00426.16
8.2.120.0030.00619.61
8.2.110.0070.00321.16
8.2.100.0040.00717.97
8.2.90.0040.00419.26
8.2.80.0050.00317.97
8.2.70.0000.00817.72
8.2.60.0040.00717.80
8.2.50.0030.00918.07
8.2.40.0030.00817.97
8.2.30.0000.00718.21
8.2.20.0050.00317.89
8.2.10.0050.00318.20
8.2.00.0040.00417.75
8.1.280.0070.00725.92
8.1.270.0150.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0050.00522.55
8.1.230.0100.00322.67
8.1.220.0060.00317.80
8.1.210.0040.00418.77
8.1.200.0050.00517.48
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0060.00318.48
8.1.160.0040.00422.09
8.1.150.0030.00518.76
8.1.140.0070.00017.64
8.1.130.0000.00817.88
8.1.120.0040.00417.63
8.1.110.0070.00017.48
8.1.100.0000.00717.66
8.1.90.0030.00317.62
8.1.80.0000.00717.48
8.1.70.0030.00317.53
8.1.60.0000.00817.68
8.1.50.0040.00417.57
8.1.40.0000.00817.59
8.1.30.0000.00917.82
8.1.20.0000.00817.84
8.1.10.0040.00417.52
8.1.00.0050.00317.62
8.0.300.0030.00518.77
8.0.290.0040.00417.00
8.0.280.0030.00518.33
8.0.270.0030.00516.96
8.0.260.0070.00017.23
8.0.250.0070.00017.11
8.0.240.0000.00717.07
8.0.230.0030.00617.10
8.0.220.0080.00017.04
8.0.210.0000.00716.94
8.0.200.0060.00017.09
8.0.190.0050.00317.09
8.0.180.0070.00016.90
8.0.170.0040.00416.96
8.0.160.0000.00717.03
8.0.150.0020.00516.86
8.0.140.0040.00417.02
8.0.130.0000.00613.50
8.0.120.0080.00017.03
8.0.110.0060.00317.00
8.0.100.0000.00716.97
8.0.90.0040.00416.84
8.0.80.0120.00917.02
8.0.70.0070.00017.03
8.0.60.0080.00016.90
8.0.50.0040.00416.92
8.0.30.0100.01017.09
8.0.20.0110.00817.40
8.0.10.0040.00417.05
8.0.00.0050.01316.95
7.4.330.0000.00515.15
7.4.320.0000.00716.56
7.4.300.0030.00316.78
7.4.290.0030.00316.71
7.4.280.0050.00516.84
7.4.270.0000.00716.79
7.4.260.0030.00616.55
7.4.250.0000.00716.77
7.4.240.0040.00416.75
7.4.230.0030.00316.60
7.4.220.0060.01316.88
7.4.210.0080.00816.83
7.4.200.0040.00416.92
7.4.160.0120.00416.77
7.4.150.0230.00317.40
7.4.140.0060.01217.86
7.4.130.0090.00916.70
7.4.120.0070.01216.70
7.4.110.0120.00616.76
7.4.100.0110.00516.73
7.4.90.0110.00616.70
7.4.80.0110.01619.39
7.4.70.0080.00816.81
7.4.60.0030.01316.54
7.4.50.0060.00316.84
7.4.40.0110.00716.66
7.4.30.0150.00316.65
7.4.00.0120.00515.28
7.3.330.0000.00513.30
7.3.320.0000.00513.13
7.3.310.0000.00616.48
7.3.300.0070.00016.40
7.3.290.0110.00316.46
7.3.280.0130.00516.43
7.3.270.0100.01017.40
7.3.260.0130.01216.39
7.3.250.0090.00916.51
7.3.240.0070.01416.69
7.3.230.0080.00816.63
7.3.210.0080.00816.76
7.3.200.0090.01419.39
7.3.190.0060.01116.71
7.3.180.0110.00716.67
7.3.170.0140.00716.41
7.3.160.0110.00516.71
7.3.120.0100.00715.02
7.3.110.0060.01214.79
7.3.100.0110.00415.05
7.3.90.0060.00914.93
7.3.80.0030.00715.16
7.3.70.0040.00714.82
7.3.60.0030.01015.04
7.3.50.0120.00314.88
7.3.40.0030.00615.00
7.3.30.0070.00715.13
7.3.20.0040.00716.91
7.3.10.0070.00716.59
7.3.00.0030.01216.75
7.2.330.0110.00716.67
7.2.320.0060.01516.70
7.2.310.0090.01116.77
7.2.300.0110.00616.65
7.2.290.0030.01316.79
7.2.250.0000.01415.08
7.2.240.0040.01415.14
7.2.230.0070.01015.17
7.2.220.0070.01015.28
7.2.210.0060.01115.25
7.2.200.0040.00915.25
7.2.190.0060.01015.13
7.2.180.0060.01014.95
7.2.170.0030.01015.08
7.1.330.0000.01515.68
7.1.320.0000.01315.95
7.1.310.0040.01115.80
7.1.300.0090.00616.12
7.1.290.0000.01315.94
7.1.280.0030.01015.89
7.1.270.0060.00315.99
7.1.260.0000.01016.02
7.1.70.0000.00917.07
7.1.60.0070.01719.70
7.1.50.0070.01817.07
7.1.00.0030.07722.54
7.0.200.0040.01116.70
7.0.140.0100.07022.01
7.0.60.0170.05719.82
7.0.50.0170.07717.91
7.0.40.0030.05019.98
7.0.30.0370.07320.13
7.0.20.0270.07720.02
7.0.10.0100.08720.14
7.0.00.0030.04320.11
5.6.280.0030.07021.10
5.6.210.0130.06320.76
5.6.200.0130.07318.21
5.6.190.0070.03720.41
5.6.180.2430.04720.48
5.6.170.0270.03320.33
5.6.160.0100.03720.61
5.6.150.0070.05718.07
5.6.140.0030.05718.21
5.6.130.0030.04318.12
5.6.120.0170.07321.14
5.6.110.0100.07721.11
5.6.100.0070.04020.94
5.6.90.0100.05321.02
5.6.80.0130.07720.38
5.6.70.4330.04020.53
5.5.350.0130.04020.40
5.5.340.0170.04318.02
5.5.330.0000.04720.57
5.5.320.0270.04320.41
5.5.310.0230.04320.30
5.5.300.0100.07718.01
5.5.290.0030.08317.92
5.5.280.0070.04720.96
5.5.270.0070.04020.78
5.5.260.0070.08020.95
5.5.250.0070.08720.58
5.5.240.0300.07320.36
5.4.450.0430.05043.90
5.4.440.0270.05043.86
5.4.430.0230.04743.79
5.4.420.0500.05743.77
5.4.410.0200.04343.77
5.4.400.0400.03343.77
5.4.390.0370.04043.77
5.4.380.0870.05318.68
5.4.370.0870.05018.49
5.4.360.0970.04018.56
5.4.350.0970.05318.47
5.4.340.0830.05318.69
5.4.320.0080.03312.46
5.4.310.0050.03812.45
5.4.300.0070.03512.46
5.4.290.0050.03812.45
5.4.280.0080.03312.35
5.4.270.0090.03912.35
5.4.260.0080.03512.35
5.4.250.0070.04212.35
5.4.240.0050.03812.35
5.4.230.0060.03912.34
5.4.220.0080.03312.34
5.4.210.0020.03912.34
5.4.200.0060.03712.34
5.4.190.0110.03512.34
5.4.180.0050.03912.34
5.4.170.0060.03612.35
5.4.160.0080.03912.35
5.4.150.0070.03412.34
5.4.140.0110.03912.03
5.4.130.0120.03412.02
5.4.120.0080.03711.97
5.4.110.0080.03611.97
5.4.100.0100.04311.97
5.4.90.0040.03911.96
5.4.80.0040.03811.96
5.4.70.0080.03311.97
5.4.60.0110.04011.96
5.4.50.0110.03711.96
5.4.40.0060.03611.95
5.4.30.0050.03811.95
5.4.20.0080.03411.95
5.4.10.0060.03511.95
5.4.00.0060.03611.44
5.3.290.0060.04012.80
5.3.280.0060.03812.71
5.3.270.0040.04112.73
5.3.260.0040.04112.71
5.3.250.0100.03612.72
5.3.240.0070.04512.72
5.3.230.0060.04312.71
5.3.220.0030.04112.68
5.3.210.0070.04212.68
5.3.200.0100.03312.68
5.3.190.0110.03512.68
5.3.180.0080.03612.67
5.3.170.0080.03412.67
5.3.160.0040.04212.67
5.3.150.0070.03612.67
5.3.140.0080.03412.66
5.3.130.0080.04312.66
5.3.120.0070.03712.65
5.3.110.0050.04112.66
5.3.100.0060.03712.12
5.3.90.0040.03712.08
5.3.80.0070.04112.07
5.3.70.0050.04112.08
5.3.60.0050.03712.06
5.3.50.0050.03712.00
5.3.40.0020.04012.00
5.3.30.0040.03711.95
5.3.20.0090.03211.73
5.3.10.0060.03511.70
5.3.00.0050.03611.69
5.2.170.0060.0369.19
5.2.160.0060.0329.19
5.2.150.0050.0309.19
5.2.140.0080.0279.19
5.2.130.0080.0269.15
5.2.120.0040.0329.15
5.2.110.0050.0289.16
5.2.100.0020.0339.15
5.2.90.0020.0329.15
5.2.80.0050.0349.14
5.2.70.0070.0359.14
5.2.60.0090.0329.10
5.2.50.0060.0329.07
5.2.40.0080.0329.05
5.2.30.0030.0319.03
5.2.20.0010.0329.01
5.2.10.0030.0328.93
5.2.00.0070.0298.78
5.1.60.0040.0318.07
5.1.50.0040.0258.06
5.1.40.0050.0238.04
5.1.30.0040.0308.39
5.1.20.0030.0318.41
5.1.10.0060.0268.14
5.1.00.0050.0248.14
5.0.50.0010.0236.61
5.0.40.0030.0206.48
5.0.30.0040.0316.30
5.0.20.0030.0206.26
5.0.10.0020.0216.24
5.0.00.0030.0336.23
4.4.90.0040.0204.78
4.4.80.0020.0164.76
4.4.70.0040.0144.76
4.4.60.0040.0144.75
4.4.50.0010.0194.77
4.4.40.0020.0264.71
4.4.30.0040.0154.76
4.4.20.0060.0144.84
4.4.10.0060.0164.85
4.4.00.0040.0234.76
4.3.110.0030.0174.67
4.3.100.0050.0174.67
4.3.90.0030.0144.64
4.3.80.0020.0294.58
4.3.70.0030.0194.63
4.3.60.0030.0144.63
4.3.50.0020.0274.63
4.3.40.0040.0254.54
4.3.30.0020.0163.29
4.3.20.0010.0173.26
4.3.10.0020.0163.22
4.3.00.0070.01743.77

preferences:
48.94 ms | 401 KiB | 5 Q