3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_between($input, $start, $end) { $substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1)); return $substr; } $the_string = "some string here string_1--------string2 some string here string_1--------string2 some string here string_1--------string2"; $a = "string_1"; $b = "string_2"; echo get_between($the_string,$a,$b);

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.0060.00916.38
8.3.50.0100.00921.99
8.3.40.0140.00718.73
8.3.30.0120.00318.68
8.3.20.0070.00020.29
8.3.10.0080.00023.70
8.3.00.0040.00420.89
8.2.180.0070.01418.19
8.2.170.0060.01122.96
8.2.160.0100.00320.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0030.00522.16
8.2.110.0090.00022.00
8.2.100.0030.00917.84
8.2.90.0090.00019.03
8.2.80.0030.00517.97
8.2.70.0000.00917.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0030.00618.05
8.2.20.0070.00017.73
8.2.10.0050.00217.70
8.2.00.0040.00417.68
8.1.280.0060.00925.92
8.1.270.0060.00323.79
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0080.00023.83
8.1.230.0070.00419.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0040.00417.53
8.1.180.0030.00518.10
8.1.170.0090.00018.54
8.1.160.0040.00421.87
8.1.150.0000.00718.49
8.1.140.0040.00417.27
8.1.130.0000.00717.75
8.1.120.0030.00317.41
8.1.110.0000.00817.35
8.1.100.0000.00717.29
8.1.90.0030.00717.30
8.1.80.0000.00717.46
8.1.70.0030.00317.22
8.1.60.0040.00417.59
8.1.50.0000.00817.54
8.1.40.0050.00317.44
8.1.30.0000.00817.58
8.1.20.0030.00617.72
8.1.10.0000.00817.42
8.1.00.0040.00417.44
8.0.300.0050.00218.77
8.0.290.0040.00417.04
8.0.280.0000.00718.45
8.0.270.0000.00816.92
8.0.260.0000.00616.77
8.0.250.0000.00717.08
8.0.240.0050.00317.02
8.0.230.0030.00516.85
8.0.220.0070.00016.97
8.0.210.0040.00416.84
8.0.200.0000.00616.85
8.0.190.0040.00416.84
8.0.180.0000.00716.85
8.0.170.0040.00416.92
8.0.160.0040.00416.89
8.0.150.0100.00016.85
8.0.140.0060.00316.76
8.0.130.0030.00313.29
8.0.120.0050.00316.88
8.0.110.0000.00816.74
8.0.100.0000.00816.75
8.0.90.0000.00716.84
8.0.80.0130.00716.95
8.0.70.0000.00716.91
8.0.60.0040.00416.81
8.0.50.0040.00416.88
8.0.30.0100.00917.09
8.0.20.0110.00817.40
8.0.10.0080.00017.08
8.0.00.0060.01216.82
7.4.330.0000.00615.03
7.4.320.0000.00616.52
7.4.300.0030.00316.63
7.4.290.0000.00716.50
7.4.280.0000.00716.52
7.4.270.0000.00716.43
7.4.260.0030.00316.54
7.4.250.0000.00816.42
7.4.240.0020.00616.58
7.4.230.0000.00716.39
7.4.220.0090.00616.48
7.4.210.0090.00816.61
7.4.200.0000.00716.70
7.4.190.0040.00416.73
7.4.160.0080.00816.63
7.4.150.0060.01017.40
7.4.140.0110.00717.86
7.4.130.0110.00616.62
7.4.120.0060.01116.56
7.4.110.0130.00316.64
7.4.100.0100.00716.54
7.4.90.0070.01016.41
7.4.80.0030.01619.39
7.4.70.0130.01216.42
7.4.60.0090.00916.48
7.4.50.0040.00416.55
7.4.40.0110.00322.77
7.4.30.0050.01116.45
7.4.00.0000.00915.12
7.3.330.0030.00313.32
7.3.320.0030.00313.30
7.3.310.0000.00716.30
7.3.300.0030.00316.18
7.3.290.0100.01016.35
7.3.280.0090.00716.35
7.3.270.0150.00917.40
7.3.260.0080.00816.25
7.3.250.0050.01516.54
7.3.240.0070.01016.56
7.3.230.0080.00816.48
7.3.210.0130.00416.52
7.3.200.0170.00919.39
7.3.190.0100.00616.44
7.3.180.0130.01016.38
7.3.170.0040.01116.32
7.3.160.0100.00716.32
7.3.120.0060.00914.74
7.2.330.0140.00316.57
7.2.320.0160.00416.79
7.2.310.0030.01316.43
7.2.300.0090.00616.41
7.2.290.0030.01816.67
7.2.00.0080.00419.33
7.1.200.0090.00615.71
7.1.100.0000.01318.23
7.1.70.0000.00917.00
7.1.60.0050.00519.29
7.1.50.0000.01216.91
7.1.00.0070.07022.44
7.0.200.0030.00716.79
7.0.140.0030.07322.08
7.0.70.0000.08721.77
7.0.60.0030.07321.68
7.0.50.0030.04322.09
7.0.40.0100.06020.18
7.0.30.0030.08720.15
7.0.20.0070.04020.14
7.0.10.0030.08020.14
7.0.00.0070.07720.13
5.6.280.0030.07320.90
5.6.220.0070.07020.59
5.6.210.0070.06020.47
5.6.200.0170.06021.04
5.6.190.0100.05720.96
5.6.180.0030.06721.01
5.6.170.0030.04320.98
5.6.160.0000.06721.01
5.6.150.0030.08320.96
5.6.140.0070.07321.05
5.6.130.0070.08721.14
5.6.120.0100.05721.04
5.6.110.0030.08021.08
5.6.100.0000.07721.09
5.6.90.0000.06721.09
5.6.80.0030.07320.39
5.6.70.0000.07020.42
5.6.60.0000.06020.40
5.6.50.0100.07020.43
5.6.40.0000.06020.39
5.6.30.0100.07020.44
5.6.20.0030.07320.34
5.6.10.0070.05320.39
5.6.00.0070.07720.37
5.5.360.0030.08020.41
5.5.350.0100.07020.43
5.5.340.0070.07320.92
5.5.330.0100.08020.84
5.5.320.0030.07320.89
5.5.310.0000.05720.76
5.5.300.0030.08320.91
5.5.290.0070.08320.80
5.5.280.0070.05020.89
5.5.270.0030.06720.75
5.5.260.0130.07320.89
5.5.250.0000.07020.65
5.5.240.0130.03720.30
5.5.230.0070.07320.31
5.5.220.0000.08720.25
5.5.210.0000.07720.28
5.5.200.0030.08020.23
5.5.190.0070.05720.23
5.5.180.0170.07020.23
5.5.160.0030.05020.24
5.5.150.0070.06020.15
5.5.140.0070.06320.11
5.5.130.0030.08020.25
5.5.120.0100.07320.18
5.5.110.0030.07320.23
5.5.100.0100.07719.97
5.5.90.0070.07720.07
5.5.80.0000.07020.02
5.5.70.0030.08019.96
5.5.60.0030.07720.05
5.5.50.0030.07720.05
5.5.40.0000.07719.96
5.5.30.0030.07020.04
5.5.20.0000.04320.13
5.5.10.0070.05720.05
5.5.00.0000.09020.04
5.4.450.0070.06019.27
5.4.440.0070.04319.53
5.4.430.0100.06019.50
5.4.420.0070.07719.27
5.4.410.0070.08319.43
5.4.400.0070.07719.04
5.4.390.0000.07319.23
5.4.380.0030.07719.04
5.4.370.0170.05319.12
5.4.360.0100.04719.23
5.4.350.0100.03019.03
5.4.340.0030.04719.09
5.4.320.0130.05718.90
5.4.310.0030.07018.91
5.4.300.0030.08019.04
5.4.290.0030.06019.04
5.4.280.0070.07718.88
5.4.270.0030.08019.03
5.4.260.0070.07719.04
5.4.250.0030.05018.94
5.4.240.0030.04719.11
5.4.230.0070.07719.04
5.4.220.0030.05019.22
5.4.210.0000.06019.04
5.4.200.0030.08019.04
5.4.190.0030.07019.04
5.4.180.0000.07018.89
5.4.170.0000.05319.08
5.4.160.0070.03719.11
5.4.150.0030.07719.03
5.4.140.0070.04316.50
5.4.130.0030.07716.41
5.4.120.0030.05316.32
5.4.110.0030.03716.44
5.4.100.0070.06016.47
5.4.90.0070.06716.48
5.4.80.0030.06316.36
5.4.70.0100.07316.37
5.4.60.0000.06716.48
5.4.50.0030.05016.48
5.4.40.0070.05716.49
5.4.30.0030.04016.45
5.4.20.0070.07016.43
5.4.10.0030.06316.44
5.4.00.0000.07315.91
5.3.290.0000.08714.69
5.3.280.0030.06314.66
5.3.270.0070.05014.52
5.3.260.0000.04714.66
5.3.250.0030.06714.54
5.3.240.0000.07714.53
5.3.230.0130.05314.70
5.3.220.0030.06014.59
5.3.210.0000.05014.66
5.3.200.0070.06314.68
5.3.190.0030.04714.59
5.3.180.0030.06714.61
5.3.170.0000.06714.49
5.3.160.0030.07714.54
5.3.150.0000.07714.68
5.3.140.0070.07014.66
5.3.130.0000.08014.68
5.3.120.0070.07714.57
5.3.110.0030.08014.65
5.3.100.0030.07014.01
5.3.90.0070.04714.15
5.3.80.0030.06014.09
5.3.70.0070.06014.15
5.3.60.0070.07314.07
5.3.50.0030.04314.08
5.3.40.0000.06013.98
5.3.30.0070.04313.97
5.3.20.0070.03013.57
5.3.10.0000.07313.77
5.3.00.0030.05713.66
5.2.170.0070.06312.23
5.2.160.0000.06712.23
5.2.150.0000.06312.23
5.2.140.0030.04312.23
5.2.130.0030.04012.23
5.2.120.0230.04312.23
5.2.110.0030.06312.23
5.2.100.0070.02712.23
5.2.90.0000.04012.23
5.2.80.0000.06312.23
5.2.70.0070.04012.23
5.2.60.0000.05712.23
5.2.50.0030.06012.23
5.2.40.0070.03712.23
5.2.30.0000.06712.23
5.2.20.0070.05312.23
5.2.10.0000.06312.23
5.2.00.0030.05712.23
5.1.60.0000.04712.23
5.1.50.0070.05012.23
5.1.40.0070.05312.23
5.1.30.0030.05012.23
5.1.20.0030.05312.23
5.1.10.0030.05312.23
5.1.00.0070.03712.23
5.0.50.0070.04312.23
5.0.40.0030.04012.23
5.0.30.0030.04712.23
5.0.20.0000.04312.23
5.0.10.0070.04312.23
5.0.00.0030.06712.23
4.4.90.0000.03312.23
4.4.80.0030.03012.23
4.4.70.0070.02712.23
4.4.60.0000.03712.23
4.4.50.0000.03312.23
4.4.40.0000.05312.23
4.4.30.0070.02712.23
4.4.20.0030.03712.23
4.4.10.0000.03712.23
4.4.00.0030.04312.23
4.3.110.0030.03012.23
4.3.100.0030.01712.23
4.3.90.0030.02012.23
4.3.80.0000.05712.23
4.3.70.0030.02312.23
4.3.60.0000.02712.23
4.3.50.0000.03312.23
4.3.40.0000.05312.23
4.3.30.0000.04012.23
4.3.20.0030.03012.23
4.3.10.0000.02712.23
4.3.00.0000.03712.23

preferences:
34.2 ms | 401 KiB | 5 Q