3v4l.org

run code in 300+ PHP versions simultaneously
<?php function AddInTheMiddle($start, $where, $what){ $arr = explode("/", $what); $str = implode("/", array_splice($arr,$start,$where)) . '/xxx/' . implode("/", $arr);; return $str; } $str = 'solutions-en/rail-technologies/track-components/name-of-product'; $str = AddInTheMiddle(1, 2, $str); echo $str;

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.0150.00616.38
8.3.50.0100.00718.04
8.3.40.0070.00718.80
8.3.30.0030.01019.21
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0150.00025.92
8.2.170.0000.01418.83
8.2.160.0100.01022.96
8.2.150.0070.00325.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00826.35
8.2.110.0070.00320.88
8.2.100.0120.00017.78
8.2.90.0090.00017.75
8.2.80.0000.00818.66
8.2.70.0040.00418.01
8.2.60.0080.00018.22
8.2.50.0030.00619.34
8.2.40.0030.00621.05
8.2.30.0040.00419.18
8.2.20.0000.00718.12
8.2.10.0040.00419.31
8.2.00.0040.00419.24
8.1.280.0150.00025.92
8.1.270.0050.00323.99
8.1.260.0050.00528.09
8.1.250.0070.00028.09
8.1.240.0100.01022.39
8.1.230.0030.00720.97
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0000.00817.23
8.1.180.0000.00718.97
8.1.170.0030.00618.43
8.1.160.0040.00418.96
8.1.150.0000.00818.89
8.1.140.0030.00318.85
8.1.130.0030.00320.08
8.1.120.0030.00317.54
8.1.110.0040.00417.31
8.1.100.0040.00417.41
8.1.90.0000.00717.38
8.1.80.0060.00317.42
8.1.70.0000.00717.45
8.1.60.0030.00517.59
8.1.50.0080.00017.36
8.1.40.0000.00817.54
8.1.30.0090.00317.51
8.1.20.0000.01117.65
8.1.10.0000.00717.39
8.1.00.0000.01117.32
8.0.300.0070.00018.77
8.0.290.0000.00816.63
8.0.280.0070.00018.46
8.0.270.0000.00716.69
8.0.260.0040.00418.38
8.0.250.0030.00316.86
8.0.240.0000.00616.95
8.0.230.0000.00716.89
8.0.220.0040.00416.79
8.0.210.0060.00016.73
8.0.200.0000.00616.82
8.0.190.0000.00816.94
8.0.180.0040.00416.79
8.0.170.0000.00816.89
8.0.160.0040.00416.88
8.0.150.0030.00716.79
8.0.140.0080.00316.71
8.0.130.0040.00413.42
8.0.120.0080.00016.83
8.0.110.0040.00416.86
8.0.100.0040.00416.70
8.0.90.0060.00316.89
8.0.80.0050.01116.82
8.0.70.0050.00216.76
8.0.60.0030.00516.80
8.0.50.0040.00416.93
8.0.30.0030.01416.96
8.0.20.0120.00717.13
8.0.10.0070.00016.78
8.0.00.0180.00316.79
7.4.330.0040.00015.55
7.4.320.0060.00016.62
7.4.300.0030.00316.43
7.4.290.0040.00416.62
7.4.280.0050.00216.58
7.4.270.0040.00416.43
7.4.260.0060.00013.29
7.4.250.0000.00716.48
7.4.240.0040.00316.53
7.4.230.0030.00316.69
7.4.220.0030.00516.61
7.4.210.0060.00916.57
7.4.200.0000.00716.68
7.4.130.0080.01116.68
7.4.120.0120.00616.60
7.4.110.0100.00716.56
7.4.100.0150.00316.52
7.4.90.0080.00816.61
7.4.80.0090.01319.39
7.4.70.0090.00916.51
7.4.60.0030.01516.43
7.4.50.0070.01016.47
7.4.40.0040.01216.69
7.4.30.0130.00616.38
7.4.20.0100.00816.21
7.4.10.0080.01616.49
7.4.00.0060.01616.35
7.3.330.0000.00716.25
7.3.320.0000.00513.33
7.3.310.0000.00616.20
7.3.300.0080.00016.36
7.3.290.0060.00816.30
7.3.260.0130.00516.61
7.3.240.0080.01016.54
7.3.230.0040.01316.29
7.3.210.0100.00616.31
7.3.200.0060.00916.48
7.3.190.0210.00316.70
7.3.180.0090.01316.30
7.3.170.0110.00516.39
7.3.160.0080.00816.48
7.3.150.0030.01416.46
7.3.140.0120.01216.40
7.3.130.0120.01216.35
7.3.120.0030.01316.22
7.3.110.0080.00816.24
7.3.100.0080.00816.40
7.3.90.0110.00916.25
7.3.80.0160.00316.31
7.3.70.0080.01316.49
7.3.60.0070.01116.46
7.3.50.0120.01016.39
7.3.40.0100.01216.21
7.3.30.0090.00916.25
7.3.20.0140.00616.56
7.3.10.0110.01116.46
7.3.00.0000.01716.39
7.2.330.0070.01016.77
7.2.320.0100.00716.70
7.2.310.0060.01116.78
7.2.300.0160.00416.52
7.2.290.0070.01016.69
7.2.280.0000.01916.67
7.2.270.0040.01916.50
7.2.260.0090.01516.80
7.2.250.0030.01416.63
7.2.240.0130.00416.63
7.2.230.0100.00716.57
7.2.220.0040.01416.76
7.2.210.0040.01316.38
7.2.200.0110.01116.39
7.2.190.0140.00816.47
7.2.180.0070.01516.44
7.2.170.0070.01116.46
7.2.160.0140.00716.57
7.2.150.0090.00916.63
7.2.140.0120.01216.60
7.2.130.0030.01716.59
7.2.120.0070.01016.52
7.2.110.0070.01116.49
7.2.100.0070.01116.58
7.2.90.0030.01516.70
7.2.80.0030.01516.54
7.2.70.0100.00716.67
7.2.60.0060.01116.51
7.2.50.0110.00716.59
7.2.40.0070.01016.59
7.2.30.0120.00616.45
7.2.20.0140.00316.65
7.2.10.0070.01116.50
7.2.00.0130.00916.41

preferences:
33.46 ms | 400 KiB | 5 Q