3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = preg_replace( '#\/_([a-z]+\/)#{0,}', '/$1$1', '/_ticket/_show/xxx' ); var_dump( $result ); exit; $found = null; $route = '/_ticket/'; foreach ( explode( '/', trim( $route, '/' ) ) as $part => $r ) { $uscore = strpos( $r, '_' ); $times = substr_count( $r, '_' ); if ( 1 != $times || 0 != $uscore ) { continue; } $found = $part; break; } if ( null !== $found ) { $parts = explode( '/', trim( $route, '/' ) ); $before = array_slice( $parts, 0, $found, true ); $after = array_slice( $parts, $found + 1, null, true ); $replacePart = ltrim( $parts[ $found ], '_' ); $before[] = $replacePart; $before[] = $replacePart; foreach ( $after as $part ) { $before[] = $part; } }

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.0130.00718.20
8.3.50.0110.00621.15
8.3.40.0070.01018.75
8.3.30.0070.00719.93
8.3.20.0040.00418.85
8.3.10.0080.00019.12
8.3.00.0000.00919.56
8.2.180.0080.01216.38
8.2.170.0070.00722.96
8.2.160.0140.00020.23
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.82
8.2.110.0030.00622.25
8.2.100.0060.00617.84
8.2.90.0040.00419.28
8.2.80.0000.00719.42
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0030.00619.94
8.2.30.0040.00421.21
8.2.20.0040.00417.67
8.2.10.0050.00317.67
8.2.00.0030.00617.60
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00720.64
8.1.230.0040.00820.97
8.1.220.0030.00518.77
8.1.210.0030.00518.91
8.1.200.0040.00817.35
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0060.00318.46
8.1.160.0040.00418.71
8.1.150.0000.00718.57
8.1.140.0000.00717.38
8.1.130.0030.00317.74
8.1.120.0040.00417.24
8.1.110.0070.00017.39
8.1.100.0060.00317.27
8.1.90.0030.00617.43
8.1.80.0030.00417.39
8.1.70.0040.00417.33
8.1.60.0040.00417.41
8.1.50.0000.00717.45
8.1.40.0050.00217.43
8.1.30.0040.00417.62
8.1.20.0020.00517.64
8.1.10.0030.00617.40
8.1.00.0030.00517.34
8.0.300.0000.00819.85
8.0.290.0050.00216.92
8.0.280.0000.00718.39
8.0.270.0000.00817.19
8.0.260.0040.00416.83
8.0.250.0000.00816.96
8.0.240.0040.00416.94
8.0.230.0030.00316.83
8.0.220.0070.00016.81
8.0.210.0040.00416.92
8.0.200.0070.00016.98
8.0.190.0000.00716.91
8.0.180.0050.00216.94
8.0.170.0000.00816.92
8.0.160.0000.00716.90
8.0.150.0000.00716.75
8.0.140.0050.00316.82
8.0.130.0000.00513.37
8.0.120.0030.00516.92
8.0.110.0080.00016.93
8.0.100.0000.00716.93
8.0.90.0050.00216.78
8.0.80.0030.01916.83
8.0.70.0040.00416.85
8.0.60.0040.00416.93
8.0.50.0030.00316.79
8.0.30.0110.00817.18
8.0.20.0080.01117.40
8.0.10.0040.00416.91
8.0.00.0100.00916.73
7.4.330.0000.00516.79
7.4.320.0000.00616.45
7.4.300.0070.00016.55
7.4.290.0030.00316.46
7.4.280.0070.00016.47
7.4.270.0000.00816.50
7.4.260.0000.00713.28
7.4.250.0070.00016.54
7.4.240.0050.00216.45
7.4.230.0030.00416.63
7.4.220.0060.01216.53
7.4.210.0120.00516.51
7.4.200.0040.00416.66
7.4.190.0030.00316.68
7.4.160.0130.00516.39
7.4.150.0040.01317.40
7.4.140.0090.00917.86
7.4.130.0130.00516.39
7.4.120.0110.00916.41
7.4.110.0070.01316.46
7.4.100.0070.01116.53
7.4.90.0090.00916.39
7.4.80.0110.01119.39
7.4.70.0070.01016.50
7.4.60.0030.01416.52
7.4.50.0090.00016.68
7.4.40.0120.00322.77
7.4.30.0090.01316.45
7.4.00.0050.01315.05
7.3.330.0030.00313.12
7.3.320.0030.00313.04
7.3.310.0070.00016.03
7.3.300.0050.00216.12
7.3.290.0060.00916.23
7.3.280.0120.00516.20
7.3.270.0100.01417.40
7.3.260.0110.01018.24
7.3.250.0080.00816.22
7.3.240.0080.00816.21
7.3.230.0100.00616.45
7.3.210.0060.01016.37
7.3.200.0190.00019.39
7.3.190.0030.01416.38
7.3.180.0060.00916.60
7.3.170.0000.01716.27
7.3.160.0120.00816.23
7.3.120.0030.01514.71
7.3.110.0070.01014.61
7.3.100.0070.00614.59
7.3.90.0040.01114.78
7.3.80.0060.00814.71
7.3.70.0030.00914.71
7.3.60.0030.01014.52
7.3.50.0050.00914.64
7.3.40.0040.00614.71
7.3.30.0090.00414.72
7.3.20.0070.00716.51
7.3.10.0080.00616.37
7.3.00.0070.00716.19
7.2.330.0080.00816.52
7.2.320.0130.01016.61
7.2.310.0120.00616.39
7.2.300.0100.00716.62
7.2.290.0130.00316.55
7.2.250.0060.01214.93
7.2.240.0070.01115.03
7.2.230.0070.00914.88
7.2.220.0050.00814.98
7.2.210.0040.00615.04
7.2.200.0020.01115.01
7.2.190.0040.00914.96
7.2.180.0030.00914.97
7.2.170.0080.00915.02
7.2.160.0030.01415.00
7.2.150.0060.00616.72
7.2.140.0060.00616.69
7.2.130.0080.01116.56
7.2.120.0100.00616.79
7.2.110.0090.00716.55
7.2.100.0130.00416.48
7.2.90.0090.00816.72
7.2.80.0110.00516.79
7.2.70.0090.00716.72
7.2.60.0050.00916.61
7.2.50.0070.00816.71
7.2.40.0130.00416.75
7.2.30.0080.00816.56
7.2.20.0060.01016.71
7.2.10.0100.00616.63
7.2.00.0110.00617.26
7.1.330.0030.01115.84
7.1.320.0090.00315.58
7.1.310.0050.00915.85
7.1.300.0040.00815.63
7.1.290.0000.01415.68
7.1.280.0060.00515.62
7.1.270.0030.01015.79
7.1.260.0060.00715.72
7.1.250.0120.00515.54
7.1.240.0060.00615.61
7.1.230.0040.00715.52
7.1.220.0040.00715.80
7.1.210.0030.00715.45
7.1.200.0070.00515.59
7.1.190.0060.00815.45
7.1.180.0060.00615.67
7.1.170.0030.00615.47
7.1.160.0060.00315.90
7.1.150.0080.00315.85
7.1.140.0070.00715.52
7.1.130.0060.00615.68
7.1.120.0030.00715.47
7.1.110.0030.01015.58
7.1.100.0060.00615.73
7.1.90.0050.00515.75
7.1.80.0030.00915.61
7.1.70.0030.00916.45
7.1.60.0030.00916.49
7.1.50.0070.00416.13
7.1.40.0000.01116.23
7.1.30.0030.01116.05
7.1.20.0050.00816.05
7.1.10.0070.00616.06
7.1.00.0040.00916.26
7.0.330.0030.01015.21
7.0.320.0040.00415.34
7.0.310.0080.00315.55
7.0.300.0050.00215.43
7.0.290.0030.00615.43
7.0.280.0040.00415.20
7.0.270.0030.00915.38
7.0.260.0030.00515.34
7.0.250.0070.00715.35
7.0.240.0040.00415.44
7.0.230.0030.01015.07
7.0.220.0060.00615.37
7.0.210.0090.00015.52
7.0.200.0020.00916.11
7.0.190.0030.00816.06
7.0.180.0030.00815.63
7.0.170.0100.00215.71
7.0.160.0060.00615.85
7.0.150.0060.00615.80
7.0.140.0020.00915.72
7.0.130.0020.01115.97
7.0.120.0000.01116.00
7.0.110.0050.00715.84
7.0.100.0070.00715.76
7.0.90.0080.00715.72
7.0.80.0050.00815.78
7.0.70.0090.00515.63
7.0.60.0050.00915.79
7.0.50.0080.00516.01
7.0.40.0060.00814.10
7.0.30.0070.00514.18
7.0.20.0050.00714.05
7.0.10.0060.00314.08
7.0.00.0020.01114.11
5.6.380.0030.00713.93
5.6.370.0060.00614.49
5.6.360.0170.00014.21
5.6.350.0080.00013.93
5.6.340.0060.00314.20
5.6.330.0070.00713.92
5.6.320.0030.01014.18
5.6.310.0060.00914.05
5.6.300.0050.02517.40
5.6.290.0030.02717.41
5.6.280.0050.02717.47
5.6.270.0060.02517.53
5.6.260.0070.02417.64
5.6.250.0100.02517.56
5.6.240.0080.02417.64
5.6.230.0020.03117.52
5.6.220.0070.02717.50
5.6.210.0020.03317.54
5.6.200.0070.03117.68
5.6.190.0050.02617.57
5.6.180.0030.04317.38
5.6.170.0050.02317.71
5.6.160.0070.02317.53
5.6.150.0050.02417.34
5.6.140.0050.02717.64
5.6.130.0020.03017.72
5.6.120.0080.03317.44
5.6.110.0050.02717.74
5.6.100.0080.02517.50
5.6.90.0090.02417.49
5.6.80.0100.02917.35
5.6.70.0080.03117.18
5.6.60.0100.02817.37
5.6.50.0080.03817.21
5.6.40.0020.02717.37
5.6.30.0080.03317.20
5.6.20.0040.02517.19
5.6.10.0020.02817.16
5.6.00.0070.04017.25
5.5.380.0020.02814.53
5.5.370.0090.01714.53
5.5.360.0030.02914.53
5.5.350.0030.02414.54
5.5.340.0050.02814.65
5.5.330.0020.02714.68
5.5.320.0110.02714.68
5.5.310.0060.02414.76
5.5.300.0030.02714.76
5.5.290.0050.02714.81
5.5.280.0050.02314.81
5.5.270.0020.02614.83
5.5.260.0020.04014.82
5.5.250.0020.03014.58
5.5.240.0050.02714.51
5.5.230.0080.03014.45
5.5.220.0070.03914.33
5.5.210.0020.02914.34
5.5.200.0030.02314.33
5.5.190.0070.02514.53
5.5.180.0060.03014.53
5.5.170.0000.01311.60
5.5.160.0030.02614.49
5.5.150.0070.02314.48
5.5.140.0010.02214.44
5.5.130.0050.03614.48
5.5.120.0070.02214.49
5.5.110.0050.02614.40
5.5.100.0050.02814.42
5.5.90.0090.02114.42
5.5.80.0110.02014.43
5.5.70.0050.02014.39
5.5.60.0030.02114.44
5.5.50.0060.03514.47
5.5.40.0050.04214.29
5.5.30.0120.02014.34
5.5.20.0050.02314.28
5.5.10.0080.02714.43
5.5.00.0040.02514.41
5.4.450.0050.02415.43
5.4.440.0020.02915.48
5.4.430.0040.03315.48
5.4.420.0050.02215.49
5.4.410.0020.02415.38
5.4.400.0030.02315.37
5.4.390.0020.02615.24
5.4.380.0050.02215.32
5.4.370.0000.02315.32
5.4.360.0050.02215.33
5.4.350.0040.02215.21
5.4.340.0050.02115.32
5.4.330.0130.00011.60
5.4.320.0040.02215.23
5.4.310.0030.02315.29
5.4.300.0080.01715.29
5.4.290.0060.02015.26
5.4.280.0070.02515.28
5.4.270.0000.02715.24
5.4.260.0050.02615.33
5.4.250.0030.02815.30
5.4.240.0030.02215.33
5.4.230.0050.02315.26
5.4.220.0130.03515.29
5.4.210.0070.02915.30
5.4.200.0050.02815.32
5.4.190.0030.03315.28
5.4.180.0020.03415.25
5.4.170.0020.02815.23
5.4.160.0030.02315.31
5.4.150.0040.03115.31
5.4.140.0020.02314.08
5.4.130.0060.03714.03
5.4.120.0030.02514.03
5.4.110.0100.01914.09
5.4.100.0000.02414.08
5.4.90.0020.02213.98
5.4.80.0000.02314.07
5.4.70.0060.01814.10
5.4.60.0070.02214.02
5.4.50.0040.02214.09
5.4.40.0020.02114.06
5.4.30.0040.02014.11
5.4.20.0000.02514.09
5.4.10.0020.02314.13
5.4.00.0030.02213.68
5.3.290.0060.02013.20
5.3.280.0020.02313.21
5.3.270.0030.02013.22
5.3.260.0050.02213.21
5.3.250.0050.02613.20
5.3.240.0050.02113.20
5.3.230.0030.03013.21
5.3.220.0060.01913.20
5.3.210.0110.02313.20
5.3.200.0080.01713.20
5.3.190.0070.02113.20
5.3.180.0060.02213.20
5.3.170.0020.02313.20
5.3.160.0090.02013.20
5.3.150.0020.02213.20
5.3.140.0050.02613.20
5.3.130.0030.02013.20
5.3.120.0080.02913.20
5.3.110.0040.01813.20
5.3.100.0040.02113.20
5.3.90.0020.02113.20
5.3.80.0040.02113.20
5.3.70.0020.02213.20
5.3.60.0030.01813.20
5.3.50.0030.02213.20
5.3.40.0050.02013.20
5.3.30.0090.03413.20
5.3.20.0060.01613.20
5.3.10.0020.03113.20
5.3.00.0030.02313.20
5.2.170.0050.02113.20
5.2.160.0020.01713.20
5.2.150.0060.01913.20
5.2.140.0050.01613.20
5.2.130.0050.02913.20
5.2.120.0030.01913.20
5.2.110.0060.02013.20
5.2.100.0020.01713.20
5.2.90.0030.01613.20
5.2.80.0030.01713.20
5.2.70.0000.01913.20
5.2.60.0000.02413.20
5.2.50.0040.01613.20
5.2.40.0040.01713.20
5.2.30.0030.02113.20
5.2.20.0040.01713.20
5.2.10.0000.02713.20
5.2.00.0020.01713.20
5.1.60.0030.01413.20
5.1.50.0020.01513.20
5.1.40.0030.01413.20
5.1.30.0060.01213.20
5.1.20.0150.01413.20
5.1.10.0040.01513.20
5.1.00.0000.01713.20
5.0.50.0040.01013.20
5.0.40.0020.01913.20
5.0.30.0020.03813.20
5.0.20.0000.01813.20
5.0.10.0120.01213.20
5.0.00.0030.01513.20
4.4.90.0020.00813.20
4.4.80.0020.00913.20
4.4.70.0010.01113.20
4.4.60.0030.00913.20
4.4.50.0000.01313.20
4.4.40.0020.01313.20
4.4.30.0020.02413.20
4.4.20.0000.01113.20
4.4.10.0020.01013.20
4.4.00.0000.01813.20
4.3.110.0010.01013.20
4.3.100.0020.01013.20
4.3.90.0030.00913.20
4.3.80.0000.01413.20
4.3.70.0020.01313.20
4.3.60.0020.02113.20
4.3.50.0020.01413.20
4.3.40.0050.01513.20
4.3.30.0020.00913.20
4.3.20.0010.01013.20
4.3.10.0020.01013.20
4.3.00.0020.01013.20

preferences:
38.47 ms | 401 KiB | 5 Q