3v4l.org

run code in 300+ PHP versions simultaneously
<?php $found = null; $route = '/_ticket/show/xxx'; 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; } var_dump( $before ); var_dump( $after ); }

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.40.0030.01318.71
8.3.30.0070.00719.29
8.3.20.0070.00020.16
8.3.10.0070.00023.65
8.3.00.0080.00019.38
8.2.170.0070.00722.96
8.2.160.0100.00320.30
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0040.00422.31
8.2.110.0030.00622.24
8.2.100.0030.00917.91
8.2.90.0000.00819.25
8.2.80.0090.00017.97
8.2.70.0000.00917.63
8.2.60.0090.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0040.00418.04
8.2.20.0030.00517.77
8.2.10.0030.00519.91
8.2.00.0070.00417.70
8.1.270.0000.00822.02
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0000.00923.97
8.1.230.0110.00018.95
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.43
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0060.00321.95
8.1.150.0000.00718.68
8.1.140.0070.00017.45
8.1.130.0000.00717.85
8.1.120.0070.00017.32
8.1.110.0040.00417.52
8.1.100.0050.00217.52
8.1.90.0040.00417.48
8.1.80.0030.00517.52
8.1.70.0030.00317.39
8.1.60.0000.00817.58
8.1.50.0030.00517.59
8.1.40.0040.00417.51
8.1.30.0040.00417.55
8.1.20.0090.00017.58
8.1.10.0040.00417.57
8.1.00.0050.00317.54
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0020.00518.50
8.0.270.0070.00017.21
8.0.260.0030.00316.90
8.0.250.0080.00017.03
8.0.240.0050.00216.98
8.0.230.0000.00716.95
8.0.220.0050.00316.94
8.0.210.0020.00516.80
8.0.200.0030.00316.93
8.0.190.0020.00516.86
8.0.180.0040.00416.89
8.0.170.0030.00516.85
8.0.160.0040.00416.97
8.0.150.0040.00416.82
8.0.140.0040.00416.89
8.0.130.0040.00413.40
8.0.120.0030.00616.90
8.0.110.0000.00716.89
8.0.100.0070.00016.75
8.0.90.0070.00016.97
8.0.80.0080.00816.87
8.0.70.0070.00016.95
8.0.60.0050.00216.82
8.0.50.0050.00216.74
8.0.30.0080.01116.92
8.0.20.0110.00817.40
8.0.10.0040.00416.93
8.0.00.0090.00816.61
7.4.330.0050.00015.00
7.4.320.0000.00716.58
7.4.300.0000.00616.55
7.4.290.0080.00016.64
7.4.280.0030.00316.62
7.4.270.0030.00316.54
7.4.260.0040.00416.48
7.4.250.0040.00416.63
7.4.240.0050.00216.55
7.4.230.0000.00716.44
7.4.220.0140.00716.54
7.4.210.0080.00816.51
7.4.200.0050.00316.64
7.4.190.0040.00416.58
7.4.160.0140.00316.55
7.4.150.0070.01117.40
7.4.140.0070.01017.86
7.4.130.0030.01416.56
7.4.120.0080.01116.56
7.4.110.0140.00316.45
7.4.100.0130.00816.41
7.4.90.0030.01416.43
7.4.80.0060.01219.39
7.4.70.0080.00816.69
7.4.60.0090.00616.48
7.4.50.0020.00216.58
7.4.40.0000.01922.77
7.4.30.0040.01216.58
7.4.00.0050.01015.02
7.3.330.0050.00013.24
7.3.320.0050.00013.13
7.3.310.0000.00716.18
7.3.300.0030.00316.34
7.3.290.0110.01116.33
7.3.280.0070.00916.36
7.3.270.0060.01117.40
7.3.260.0180.00616.30
7.3.250.0120.01016.39
7.3.240.0100.00616.41
7.3.230.0100.00616.43
7.3.210.0060.01216.37
7.3.200.0170.00319.39
7.3.190.0070.01016.42
7.3.180.0050.01016.41
7.3.170.0080.00816.63
7.3.160.0100.00716.38
7.3.120.0080.00914.96
7.3.110.0080.00914.73
7.3.100.0040.01014.79
7.3.90.0060.00915.04
7.3.80.0040.00814.79
7.3.70.0070.00714.89
7.3.60.0070.00514.79
7.3.50.0070.00814.80
7.3.40.0060.00814.75
7.3.30.0020.01114.78
7.3.20.0080.00516.62
7.3.10.0060.00516.57
7.3.00.0050.01016.73
7.2.330.0060.01216.41
7.2.320.0090.00916.75
7.2.310.0150.00316.49
7.2.300.0060.00916.71
7.2.290.0110.01116.77
7.2.250.0070.01115.27
7.2.240.0080.01015.07
7.2.230.0080.00715.17
7.2.220.0050.01114.99
7.2.210.0020.01414.89
7.2.200.0070.00615.15
7.2.190.0020.01015.01
7.2.180.0080.00715.10
7.2.170.0050.01215.04
7.2.160.0100.00314.82
7.2.150.0030.01017.06
7.2.140.0060.00617.04
7.2.130.0000.01217.00
7.2.120.0070.00717.00
7.2.110.0030.01017.09
7.2.100.0060.00616.95
7.2.90.0070.00716.94
7.2.80.0100.00316.79
7.2.70.0030.01616.90
7.2.60.0060.00916.77
7.2.50.0090.00916.73
7.2.40.0070.00717.03
7.2.30.0090.00616.89
7.2.20.0000.01416.86
7.2.10.0100.00317.13
7.2.00.0090.00616.87
7.1.330.0100.00815.93
7.1.320.0070.00815.94
7.1.310.0050.00815.81
7.1.300.0020.00815.81
7.1.290.0060.00915.84
7.1.280.0030.00915.78
7.1.270.0070.00515.80
7.1.260.0040.00815.73
7.1.250.0040.00815.76
7.1.70.0030.00317.09
7.1.60.0070.01819.33
7.1.50.0000.01016.98
7.1.00.0030.09022.29
7.0.200.0030.00616.81
7.0.140.0030.07321.95
7.0.110.0100.05320.02
7.0.100.0100.07019.99
7.0.90.0000.04319.96
7.0.80.0070.04319.94
7.0.70.0100.05020.01
7.0.60.0030.04019.95
7.0.50.0070.04020.03
7.0.40.0000.04719.75
7.0.30.0070.05019.66
7.0.20.0030.07719.82
7.0.10.0070.03319.64
7.0.00.0030.05719.64
5.6.280.0000.07721.05
5.6.260.0070.03720.74
5.6.250.0030.07720.63
5.6.240.0070.03720.48
5.6.230.0030.04320.61
5.6.220.0100.04720.68
5.6.210.0100.03020.66
5.6.200.0130.07320.71
5.6.190.0100.08020.59
5.6.180.0070.03720.57
5.6.170.0070.07320.63
5.6.160.0100.03020.56
5.6.150.0030.09020.71
5.6.140.0100.07720.62
5.6.130.0070.08020.66
5.6.120.0100.03720.64
5.6.110.0000.03720.59
5.6.100.0100.06020.59
5.6.90.0000.05020.60
5.6.80.0030.08020.09
5.6.70.0000.04720.08
5.6.60.0030.06720.23
5.6.50.0030.04020.07
5.6.40.0070.04019.99
5.6.30.0130.07320.04
5.6.20.0130.06320.00
5.6.10.0030.06020.07
5.6.00.0030.04319.97
5.5.380.0070.04017.50
5.5.370.0000.05017.45
5.5.360.0030.03317.50
5.5.350.0100.05017.49
5.5.340.0070.04717.84
5.5.330.0030.04018.22
5.5.320.0030.06017.89
5.5.310.0070.07018.15
5.5.300.0070.07317.99
5.5.290.0130.06317.77
5.5.280.0070.08017.77
5.5.270.0070.03017.86
5.5.260.0070.08018.24
5.5.250.0030.03717.81
5.5.240.0070.05317.48
5.5.230.0070.07717.36
5.5.220.0070.05017.39
5.5.210.0030.03717.55
5.5.200.0030.04317.60
5.5.190.0100.03017.33
5.5.180.0030.07017.44
5.5.160.0030.03317.44
5.5.150.0030.04317.34
5.5.140.0030.04717.44
5.5.130.0030.07017.20
5.5.120.0000.03717.33
5.5.110.0000.05717.59
5.5.100.0070.08317.35
5.5.90.0030.06717.37
5.5.80.0100.04017.01
5.5.70.0100.02717.41
5.5.60.0030.03017.43
5.5.50.0000.06017.13
5.5.40.0100.06017.49
5.5.30.0100.03317.37
5.5.20.0070.07017.25
5.5.10.0030.07717.00
5.5.00.0000.04017.39
5.4.450.0000.05319.43
5.4.440.0030.03719.31
5.4.430.0100.07319.44
5.4.420.0070.03719.57
5.4.410.0030.06319.20
5.4.400.0030.07019.12
5.4.390.0070.05719.00
5.4.380.0030.03718.95
5.4.370.0070.03319.03
5.4.360.0030.05319.16
5.4.350.0070.04319.03
5.4.340.0030.03719.12
5.4.320.0000.04318.98
5.4.310.0070.03319.01
5.4.300.0170.05018.98
5.4.290.0000.04319.01
5.4.280.0200.02019.26
5.4.270.0000.05319.14
5.4.260.0070.06719.02
5.4.250.0030.06319.07
5.4.240.0070.05019.15
5.4.230.0100.05018.97
5.4.220.0070.05719.03
5.4.210.0130.05318.99
5.4.200.0100.03019.17
5.4.190.0030.06318.95
5.4.180.0130.02319.07
5.4.170.0000.05318.92
5.4.160.0100.03319.05
5.4.150.0130.06319.09
5.4.140.0130.04016.47
5.4.130.0000.03316.21
5.4.120.0070.05716.19
5.4.110.0100.03716.54
5.4.100.0030.05716.23
5.4.90.0030.06316.38
5.4.80.0000.04016.49
5.4.70.0030.05716.45
5.4.60.0000.03316.16
5.4.50.0070.04016.25
5.4.40.0000.03716.52
5.4.30.0030.08316.36
5.4.20.0070.05716.20
5.4.10.0030.03716.10
5.4.00.0000.05015.88
5.3.290.0030.04014.74
5.3.280.0100.02714.68
5.3.270.0070.03014.54
5.3.260.0070.07314.40
5.3.250.0030.05014.46
5.3.240.0170.05014.50
5.3.230.0030.03314.70
5.3.220.0000.05714.52
5.3.210.0100.05314.59
5.3.200.0070.03314.43
5.3.190.0130.06014.52
5.3.180.0030.05014.46
5.3.170.0000.03314.67
5.3.160.0030.07714.38
5.3.150.0070.06714.67
5.3.140.0000.05014.56
5.3.130.0030.06714.42
5.3.120.0070.03014.55
5.3.110.0100.03714.63
5.3.100.0030.06713.94
5.3.90.0070.04714.10
5.3.80.0070.04013.95
5.3.70.0030.03314.09
5.3.60.0000.04013.89
5.3.50.0070.03314.02
5.3.40.0030.05013.85
5.3.30.0000.03713.70
5.3.20.0030.06013.59
5.3.10.0070.04013.60
5.3.00.0030.04013.48
5.2.170.0100.02311.91
5.2.160.0000.05011.91
5.2.150.0030.04711.91
5.2.140.0030.07011.91
5.2.130.0030.03011.91
5.2.120.0100.05711.91
5.2.110.0100.05311.91
5.2.100.0030.04011.91
5.2.90.0000.03711.91
5.2.80.0070.06011.91
5.2.70.0030.05711.91
5.2.60.0000.05311.91
5.2.50.0070.02311.91
5.2.40.0030.03711.91
5.2.30.0030.02711.91
5.2.20.0070.04711.91
5.2.10.0000.05011.91
5.2.00.0070.05311.91
5.1.60.0000.04011.91
5.1.50.0030.03311.91
5.1.40.0030.04011.91
5.1.30.0030.02711.91
5.1.20.0030.03011.91
5.1.10.0100.04711.91
5.1.00.0030.05311.91
5.0.50.0030.01711.91
5.0.40.0030.04311.91
5.0.30.0000.05711.91
5.0.20.0030.02711.91
5.0.10.0070.01311.91
5.0.00.0000.03011.91
4.4.90.0000.04011.91
4.4.80.0030.03311.91
4.4.70.0000.02011.91
4.4.60.0000.02011.91
4.4.50.0030.03311.91
4.4.40.0000.05011.91
4.4.30.0000.02011.91
4.4.20.0000.01711.91
4.4.10.0000.03311.91
4.4.00.0000.02011.91
4.3.110.0000.03711.91
4.3.100.0030.01011.91
4.3.90.0000.03011.91
4.3.80.0030.02311.91
4.3.70.0070.01711.91
4.3.60.0000.01311.91
4.3.50.0000.02011.91
4.3.40.0000.02311.91
4.3.30.0000.01711.91
4.3.20.0000.01311.91
4.3.10.0030.03011.91
4.3.00.0000.01711.91

preferences:
40.89 ms | 400 KiB | 5 Q