3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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; } 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.60.0110.00418.55
8.3.50.0060.01021.27
8.3.40.0140.00718.84
8.3.30.0070.00718.63
8.3.20.0040.00418.79
8.3.10.0050.00319.28
8.3.00.0070.00021.95
8.2.180.0090.00918.41
8.2.170.0070.00722.96
8.2.160.0100.00320.43
8.2.150.0030.00524.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0100.00022.20
8.2.100.0090.00317.84
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0000.00717.97
8.2.30.0040.00419.94
8.2.20.0000.00817.79
8.2.10.0000.00817.83
8.2.00.0040.00417.77
8.1.280.0110.00425.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.60
8.1.230.0070.00421.03
8.1.220.0050.00318.77
8.1.210.0060.00318.82
8.1.200.0030.00717.35
8.1.190.0000.00817.50
8.1.180.0080.00018.10
8.1.170.0050.00318.66
8.1.160.0040.00418.83
8.1.150.0050.00218.60
8.1.140.0000.00717.52
8.1.130.0030.00317.89
8.1.120.0040.00417.49
8.1.110.0030.00717.41
8.1.100.0000.00817.50
8.1.90.0000.00817.45
8.1.80.0050.00317.37
8.1.70.0000.00717.35
8.1.60.0080.00017.55
8.1.50.0000.00817.55
8.1.40.0040.00417.53
8.1.30.0040.00417.65
8.1.20.0000.00817.59
8.1.10.0060.00317.42
8.1.00.0030.00817.45
8.0.300.0060.00320.02
8.0.290.0060.00317.04
8.0.280.0000.00718.46
8.0.270.0000.00717.34
8.0.260.0000.00616.89
8.0.250.0040.00416.99
8.0.240.0000.00816.96
8.0.230.0000.00716.95
8.0.220.0030.00316.95
8.0.210.0000.00716.81
8.0.200.0030.00317.02
8.0.190.0050.00216.88
8.0.180.0040.00416.84
8.0.170.0040.00416.84
8.0.160.0000.00716.91
8.0.150.0070.00316.89
8.0.140.0040.00316.83
8.0.130.0060.00013.32
8.0.120.0000.00716.76
8.0.110.0000.00816.79
8.0.100.0000.00716.80
8.0.90.0030.00616.85
8.0.80.0060.00916.94
8.0.70.0000.00716.81
8.0.60.0000.00716.79
8.0.50.0080.00016.82
8.0.30.0120.01116.93
8.0.20.0090.01117.40
8.0.10.0040.00416.93
8.0.00.0110.00816.83
7.4.330.0020.00214.65
7.4.320.0030.00316.44
7.4.300.0000.00616.45
7.4.290.0030.00316.52
7.4.280.0050.00316.43
7.4.270.0070.00016.51
7.4.260.0050.00013.24
7.4.250.0000.00716.59
7.4.240.0000.00816.52
7.4.230.0040.00316.68
7.4.220.0170.00016.40
7.4.210.0070.01116.61
7.4.200.0000.00716.62
7.4.190.0030.00716.69
7.4.160.0080.00816.48
7.4.150.0060.01217.40
7.4.140.0100.00717.86
7.4.130.0090.00816.67
7.4.120.0070.01216.56
7.4.110.0090.00916.36
7.4.100.0080.00816.45
7.4.90.0060.01216.71
7.4.80.0070.01519.37
7.4.70.0120.00616.49
7.4.60.0000.01616.46
7.4.50.0030.00616.36
7.4.40.0060.00922.27
7.4.30.0090.00916.64
7.4.00.0070.00715.11
7.3.330.0050.00013.32
7.3.320.0000.00613.07
7.3.310.0080.00016.27
7.3.300.0000.00716.36
7.3.290.0070.00716.33
7.3.280.0050.01116.34
7.3.270.0110.00617.40
7.3.260.0100.00718.24
7.3.250.0130.00716.46
7.3.240.0120.00416.68
7.3.230.0100.00616.45
7.3.210.0120.00816.30
7.3.200.0190.00319.39
7.3.190.0070.01016.59
7.3.180.0100.01016.31
7.3.170.0060.01216.31
7.3.160.0090.01216.37
7.3.120.0030.00914.79
7.2.330.0060.01216.87
7.2.320.0100.00716.79
7.2.310.0030.01716.82
7.2.300.0090.00916.74
7.2.290.0110.00616.58
7.2.00.0060.00619.32
7.1.100.0030.01018.31
7.1.70.0070.00317.15
7.1.60.0030.01019.40
7.1.50.0180.01117.11
7.1.00.0000.04022.28
7.0.200.0060.00316.79
7.0.140.0000.07322.07
7.0.60.0070.07720.05
7.0.50.0130.08017.82
7.0.40.0000.04720.06
7.0.30.0300.05320.17
7.0.20.0300.05020.09
7.0.10.0130.07720.20
7.0.00.0100.07720.16
5.6.280.0070.07021.02
5.6.210.0030.08720.48
5.6.200.0070.08718.12
5.6.190.0030.04320.49
5.6.180.0300.08320.50
5.6.170.0370.05020.48
5.6.160.0070.05020.52
5.6.150.0100.05018.20
5.6.140.0030.06718.10
5.6.130.0070.08318.21
5.6.120.0030.07721.02
5.6.110.0070.06020.99
5.6.100.0070.06721.05
5.6.90.0030.04721.11
5.6.80.0170.06720.45
5.6.70.4330.04020.46
5.5.350.0030.05320.34
5.5.340.0030.05017.98
5.5.330.0070.04020.38
5.5.320.0370.06320.20
5.5.310.0300.06720.26
5.5.300.0100.07318.01
5.5.290.0070.07317.89
5.5.280.0030.04720.96
5.5.270.0130.03320.68
5.5.260.0100.08720.76
5.5.250.0030.09320.66
5.5.240.0130.04320.37
5.4.450.0370.07019.14
5.4.440.0200.03719.13
5.4.430.0270.07319.54
5.4.420.0230.05319.45
5.4.410.0200.03719.25
5.4.400.0230.04719.09
5.4.390.0200.04719.08
5.4.380.0300.06319.09
5.4.370.0230.05019.13
5.4.360.0230.03719.22
5.4.350.0430.06018.93
5.4.340.0300.05719.25
5.4.320.0300.04719.08
5.4.310.0300.05719.09
5.4.300.0330.06718.88
5.4.290.0430.05319.07
5.4.280.0270.06019.10
5.4.270.0270.06019.07
5.4.260.0300.07019.16
5.4.250.0330.06719.15
5.4.240.0370.06019.15
5.4.230.0270.06019.24
5.4.220.0270.06318.88
5.4.210.0230.06319.12
5.4.200.0330.02719.08
5.4.190.0200.04019.09
5.4.180.0370.05319.09
5.4.170.0270.05019.05
5.4.160.0330.03719.10
5.4.150.0300.03319.07
5.4.140.0300.06716.29
5.4.130.0230.05016.24
5.4.120.0370.06316.54
5.4.110.0270.04716.32
5.4.100.0270.04716.22
5.4.90.0370.03316.39
5.4.80.0400.05316.46
5.4.70.0230.03716.48
5.4.60.0230.07716.30
5.4.50.0230.04716.36
5.4.40.0230.06016.46
5.4.30.0230.03716.38
5.4.20.0270.04316.36
5.4.10.0300.05316.17
5.4.00.0230.04315.95
5.3.290.0270.05314.63
5.3.280.0270.05014.47
5.3.270.0300.05714.71
5.3.260.0230.06014.64
5.3.250.0270.04714.45
5.3.240.0300.03314.59
5.3.230.0300.05714.59
5.3.220.0370.06714.43
5.3.210.0300.07314.52
5.3.200.0370.05314.41
5.3.190.0300.07314.43
5.3.180.0270.05014.53
5.3.170.0300.07014.60
5.3.160.0170.04314.42
5.3.150.0300.06714.48
5.3.140.0230.03714.65
5.3.130.0200.04014.39
5.3.120.0270.07314.52
5.3.110.0370.06314.50
5.3.100.0370.06714.07
5.3.90.0330.06713.89
5.3.80.0300.04713.96
5.3.70.0230.04013.99
5.3.60.0200.04013.95
5.3.50.0330.05713.81
5.3.40.0370.06013.89
5.3.30.0200.04013.90
5.3.20.0300.04713.54
5.3.10.0230.04013.50
5.3.00.0270.07013.68
5.2.170.0270.05711.21
5.2.160.0230.05311.33
5.2.150.0300.02311.02
5.2.140.0330.04711.20
5.2.130.0230.03711.05
5.2.120.0230.03311.13
5.2.110.0200.05711.02
5.2.100.0200.05710.98
5.2.90.0170.06310.96
5.2.80.0200.05710.97
5.2.70.0230.04010.96
5.2.60.0230.05710.90
5.2.50.0170.03010.96
5.2.40.0200.04011.16
5.2.30.0130.04010.90
5.2.20.0170.05010.90
5.2.10.0200.02710.90
5.2.00.0200.05010.90
5.1.60.0230.04710.90
5.1.50.0170.05310.90
5.1.40.0230.04710.90
5.1.30.0230.05010.90
5.1.20.0270.05010.90
5.1.10.0130.04310.90
5.1.00.0200.03010.90
5.0.50.0100.02010.90
5.0.40.0100.03310.90
5.0.30.0200.04010.90
5.0.20.0170.04010.90
5.0.10.0070.02310.90
5.0.00.0130.03010.90
4.4.90.0170.02710.90
4.4.80.0130.01710.90
4.4.70.0070.03310.90
4.4.60.0100.02710.90
4.4.50.0130.02010.90
4.4.40.0100.03710.90
4.4.30.0070.02710.90
4.4.20.0100.01710.90
4.4.10.0100.03710.90
4.4.00.0070.04710.90
4.3.110.0130.03710.90
4.3.100.0100.01710.90
4.3.90.0130.02010.90
4.3.80.0070.02710.90
4.3.70.0070.01710.90
4.3.60.0100.01710.90
4.3.50.0130.03010.90
4.3.40.0130.04010.90
4.3.30.0070.03710.90
4.3.20.0070.02710.90
4.3.10.0070.03710.90
4.3.00.0030.02010.90

preferences:
41.52 ms | 400 KiB | 5 Q