3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetBetween($content,$start,$end){ $r = explode($start, $content); if (isset($r[1])){ $r = explode($end, $r[1]); return $r[0]; } return ''; } echo GetBetween('foo test bar', 'foo', 'bar'); $var=explode('test','foo test bar'); print_r( $var); //print_r(explode("help","help php help program help is good")); ?>

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.00718.05
8.3.50.0150.00522.00
8.3.40.0110.00418.85
8.3.30.0100.00319.22
8.3.20.0080.00020.39
8.3.10.0040.00421.95
8.3.00.0040.00422.42
8.2.180.0110.00416.32
8.2.170.0070.00722.96
8.2.160.0040.01121.02
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00017.75
8.2.110.0150.00622.20
8.2.100.0070.00417.84
8.2.90.0080.00019.37
8.2.80.0050.00317.97
8.2.70.0070.00317.63
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0000.00818.04
8.2.20.0070.00017.73
8.2.10.0000.00717.69
8.2.00.0040.00417.73
8.1.280.0060.01625.92
8.1.270.0060.00322.05
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0100.00023.96
8.1.230.0070.00419.09
8.1.220.0090.00017.74
8.1.210.0080.00018.77
8.1.200.0000.00917.23
8.1.190.0000.00717.39
8.1.180.0050.00318.10
8.1.170.0050.00318.54
8.1.160.0000.00721.83
8.1.150.0040.00418.49
8.1.140.0040.00417.37
8.1.130.0030.00317.71
8.1.120.0070.00017.36
8.1.110.0040.00417.43
8.1.100.0040.00417.40
8.1.90.0040.00417.25
8.1.80.0000.00717.28
8.1.70.0030.00317.38
8.1.60.0050.00517.43
8.1.50.0070.00017.48
8.1.40.0000.00717.43
8.1.30.0000.00817.54
8.1.20.0040.00417.64
8.1.10.0000.00817.60
8.1.00.0080.00017.56
8.0.300.0050.00318.77
8.0.290.0000.00717.28
8.0.280.0000.00718.36
8.0.270.0000.00717.31
8.0.260.0030.00316.82
8.0.250.0030.00316.97
8.0.240.0030.00516.97
8.0.230.0070.00316.79
8.0.220.0000.00716.86
8.0.210.0030.00316.77
8.0.200.0030.00316.91
8.0.190.0000.00816.84
8.0.180.0000.00716.84
8.0.170.0080.00016.91
8.0.160.0030.00316.71
8.0.150.0040.00416.80
8.0.140.0040.00416.80
8.0.130.0030.00313.30
8.0.120.0050.00216.82
8.0.110.0050.00316.76
8.0.100.0040.00416.75
8.0.90.0050.00316.89
8.0.80.0040.01116.72
8.0.70.0030.00316.63
8.0.60.0070.00016.71
8.0.50.0070.00016.90
8.0.30.0030.01517.23
8.0.20.0080.01017.43
8.0.10.0000.00716.98
8.0.00.0050.01316.75
7.4.330.0000.00515.09
7.4.320.0000.00616.47
7.4.300.0030.00316.65
7.4.290.0000.00616.66
7.4.280.0040.00416.61
7.4.270.0000.00616.56
7.4.260.0040.00416.43
7.4.250.0030.00516.46
7.4.240.0040.00316.49
7.4.230.0000.00716.57
7.4.220.0140.00416.47
7.4.210.0110.00516.60
7.4.200.0040.00416.48
7.4.190.0030.00316.65
7.4.160.0070.01116.64
7.4.150.0060.01217.40
7.4.140.0100.00717.86
7.4.130.0060.01416.53
7.4.120.0090.00916.55
7.4.110.0130.00416.38
7.4.100.0100.00716.52
7.4.90.0070.01016.35
7.4.80.0120.00619.39
7.4.70.0100.01316.45
7.4.60.0100.00716.44
7.4.50.0040.00016.56
7.4.40.0070.01122.77
7.4.30.0060.00916.34
7.4.00.0090.00615.03
7.3.330.0000.00613.30
7.3.320.0050.00013.39
7.3.310.0030.00516.36
7.3.300.0030.00316.25
7.3.290.0100.01016.32
7.3.280.0100.00716.32
7.3.270.0100.00717.40
7.3.260.0100.01016.55
7.3.250.0130.00816.55
7.3.240.0190.00416.19
7.3.230.0160.00316.39
7.3.210.0190.00016.58
7.3.200.0090.01219.39
7.3.190.0030.01416.34
7.3.180.0040.01116.37
7.3.170.0090.00616.68
7.3.160.0090.00616.52
7.3.120.0090.00614.77
7.3.110.0000.01814.75
7.3.100.0120.00614.92
7.3.90.0040.01215.04
7.3.80.0000.01415.00
7.3.70.0060.00914.61
7.3.60.0060.00614.91
7.3.50.0130.00314.85
7.3.40.0000.01514.71
7.3.30.0090.00614.79
7.3.20.0030.01016.65
7.3.10.0100.00616.41
7.3.00.0090.00616.60
7.2.330.0060.01216.41
7.2.320.0130.01016.37
7.2.310.0070.01016.75
7.2.300.0110.00616.81
7.2.290.0180.00316.31
7.2.250.0140.00714.86
7.2.240.0070.01415.00
7.2.230.0070.01014.98
7.2.220.0070.00714.68
7.2.210.0080.00615.25
7.2.200.0090.00615.21
7.2.190.0040.01215.03
7.2.180.0140.00415.02
7.2.170.0070.00715.01
7.1.330.0070.00715.67
7.1.320.0000.01116.05
7.1.310.0000.01815.93
7.1.300.0090.00316.00
7.1.290.0040.01115.82
7.1.280.0060.00615.96
7.1.270.0060.00615.46
7.1.260.0090.00315.68
7.1.70.0030.00617.19
7.1.60.0070.01819.82
7.1.50.0070.01317.01
7.1.00.0100.07022.28
7.0.200.0040.00416.63
7.0.140.0000.07722.09
7.0.70.0230.06721.70
7.0.60.0000.05321.78
7.0.50.0130.07322.18
7.0.40.0070.05319.92
7.0.30.0100.07320.08
7.0.20.0030.08720.19
7.0.10.0000.07020.09
7.0.00.0030.07020.16
5.6.220.0030.08320.59
5.6.210.0030.08020.59
5.6.200.0030.05021.09
5.6.190.0130.05321.02
5.6.180.0030.08721.05
5.6.170.0230.06721.05
5.6.160.0130.05720.94
5.6.150.0000.08721.05
5.6.140.0030.08020.99
5.6.130.0030.08721.07
5.6.120.0030.08721.00
5.6.110.0070.08320.94
5.6.100.0130.08320.95
5.6.90.0070.08321.00
5.6.80.0030.08320.33
5.6.70.0000.07320.32
5.6.60.0070.08320.55
5.6.50.0030.05720.39
5.6.40.0100.07320.40
5.6.30.0070.07020.44
5.6.20.0070.06720.44
5.6.10.0100.06020.36
5.6.00.0030.06020.38
5.5.360.0000.08720.41
5.5.350.0100.04720.42
5.5.340.0100.04320.88
5.5.330.0100.07720.84
5.5.320.0000.05320.88
5.5.310.0100.07020.86
5.5.300.0070.06720.86
5.5.290.0000.06020.91
5.5.280.0030.07320.90
5.5.270.0000.05720.88
5.5.260.0000.08720.90
5.5.250.0170.06720.61
5.5.240.0070.07320.29
5.5.230.0070.08020.25
5.5.220.0070.07320.25
5.5.210.0070.08020.02
5.5.200.0100.06320.17
5.5.190.0170.06320.21
5.5.180.0030.05320.28
5.5.160.0000.05320.23
5.5.150.0130.04020.15
5.5.140.0030.08020.21
5.5.130.0000.06020.23
5.5.120.0230.04320.27
5.5.110.0070.05320.23
5.5.100.0030.08020.10
5.5.90.0170.04319.95
5.5.80.0070.03720.16
5.5.70.0000.08720.16
5.5.60.0100.07020.10
5.5.50.0100.04320.08
5.5.40.0000.06720.06
5.5.30.0100.07720.08
5.5.20.0100.07020.15
5.5.10.0000.08020.11
5.5.00.0070.03720.02
5.4.450.0070.06719.36
5.4.440.0000.04319.54
5.4.430.0030.08319.22
5.4.420.0070.06019.44
5.4.410.0070.07019.07
5.4.400.0030.07318.85
5.4.390.0130.07019.13
5.4.380.0000.07719.04
5.4.370.0030.06319.13
5.4.360.0100.03718.85
5.4.350.0000.08319.16
5.4.340.0070.08019.14
5.4.320.0030.06319.13
5.4.310.0030.07319.13
5.4.300.0070.06719.25
5.4.290.0000.04718.88
5.4.280.0070.07719.12
5.4.270.0030.08018.94
5.4.260.0170.07019.23
5.4.250.0100.05018.87
5.4.240.0000.08019.04
5.4.230.0100.07318.89
5.4.220.0070.06718.89
5.4.210.0100.07019.08
5.4.200.0070.06718.87
5.4.190.0000.06319.12
5.4.180.0070.07719.11
5.4.170.0000.07319.04
5.4.160.0070.03319.17
5.4.150.0070.05319.11
5.4.140.0070.04016.36
5.4.130.0030.03716.43
5.4.120.0030.03316.24
5.4.110.0000.03716.50
5.4.100.0000.03716.34
5.4.90.0000.03716.55
5.4.80.0030.03316.45
5.4.70.0000.03016.45
5.4.60.0000.03716.32
5.4.50.0000.03316.45
5.4.40.0030.03016.46
5.4.30.0030.03316.44
5.4.20.0000.03716.43
5.4.10.0000.04316.36
5.4.00.0000.03315.63
5.3.290.0130.06714.63
5.3.280.0070.07014.68
5.3.270.0000.04014.54
5.3.260.0000.04014.66
5.3.250.0070.03014.71
5.3.240.0170.04314.53
5.3.230.0070.03714.68
5.3.220.0000.03714.65
5.3.210.0030.03314.59
5.3.200.0000.04314.57
5.3.190.0000.04314.53
5.3.180.0030.03314.65
5.3.170.0070.04714.55
5.3.160.0000.03714.63
5.3.150.0030.03314.67
5.3.140.0070.02714.55
5.3.130.0000.03314.59
5.3.120.0000.04014.61
5.3.110.0000.07314.54
5.3.100.0000.03713.97
5.3.90.0100.02314.13
5.3.80.0000.03314.09
5.3.70.0000.04014.03
5.3.60.0030.03313.93
5.3.50.0000.03314.02
5.3.40.0030.05014.05
5.3.30.0030.03313.92
5.3.20.0000.02713.59
5.3.10.0030.03013.76
5.3.00.0030.03313.73
5.2.170.0000.02312.22
5.2.160.0000.02712.22
5.2.150.0000.03012.22
5.2.140.0030.04012.22
5.2.130.0000.02712.22
5.2.120.0000.03012.22
5.2.110.0030.02712.22
5.2.100.0000.02312.22
5.2.90.0030.03712.22
5.2.80.0000.03012.22
5.2.70.0000.03012.22
5.2.60.0000.04712.22
5.2.50.0030.03012.22
5.2.40.0000.02712.22
5.2.30.0000.02712.22
5.2.20.0030.02312.22
5.2.10.0030.02012.22
5.2.00.0000.02712.22
5.1.60.0000.02312.22
5.1.50.0030.02312.22
5.1.40.0000.02312.22
5.1.30.0000.03012.22
5.1.20.0030.01712.22
5.1.10.0000.02312.22
5.1.00.0000.02012.22
5.0.50.0030.01312.22
5.0.40.0000.02012.22
5.0.30.0000.03012.22
5.0.20.0000.01712.22
5.0.10.0000.02012.22
5.0.00.0000.03012.22
4.4.90.0030.01012.22
4.4.80.0000.01712.22
4.4.70.0030.01312.22
4.4.60.0000.01712.22
4.4.50.0000.01312.22
4.4.40.0000.02012.22
4.4.30.0000.01712.22
4.4.20.0000.01312.22
4.4.10.0000.01312.22
4.4.00.0000.02012.22
4.3.110.0030.02012.22
4.3.100.0000.01312.22
4.3.90.0000.01312.22
4.3.80.0030.02712.22
4.3.70.0000.01712.22
4.3.60.0000.01712.22
4.3.50.0000.02712.22
4.3.40.0000.04312.22
4.3.30.0000.04012.22
4.3.20.0000.03012.22
4.3.10.0030.01312.22
4.3.00.0000.03312.22

preferences:
42.15 ms | 401 KiB | 5 Q