3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello world; This is a nice day; after"; $str = explode(";",$string); $size=sizeof($str); $newstr = array(); $newstr[0] = $str[$size-1]; $newstr[1] = "--".substr($string, 0, strrpos($string, ";"))."--"; print_r($newstr);

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.18
8.3.50.0130.00921.27
8.3.40.0070.00718.76
8.3.30.0100.01019.22
8.3.20.0000.00720.20
8.3.10.0060.00921.92
8.3.00.0060.00322.44
8.2.180.0140.00316.63
8.2.170.0090.00622.96
8.2.160.0030.01319.38
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00819.66
8.2.110.0080.00022.25
8.2.100.0110.00019.21
8.2.90.0030.00519.28
8.2.80.0000.00719.39
8.2.70.0040.00417.50
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0040.00418.28
8.2.30.0050.00218.18
8.2.20.0050.00317.62
8.2.10.0030.00517.64
8.2.00.0050.00317.61
8.1.280.0140.00725.92
8.1.270.0080.00022.06
8.1.260.0140.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0030.00818.94
8.1.220.0070.00017.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0080.00017.53
8.1.180.0000.00818.80
8.1.170.0040.00418.41
8.1.160.0090.00022.05
8.1.150.0000.00818.69
8.1.140.0000.00717.32
8.1.130.0000.00817.81
8.1.120.0000.00817.49
8.1.110.0070.00017.50
8.1.100.0000.00717.44
8.1.90.0070.00017.35
8.1.80.0040.00417.46
8.1.70.0070.00017.34
8.1.60.0040.00417.58
8.1.50.0040.00417.51
8.1.40.0040.00417.41
8.1.30.0040.00417.62
8.1.20.0040.00417.55
8.1.10.0000.00717.55
8.1.00.0000.00917.51
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0070.00018.36
8.0.270.0000.00717.18
8.0.260.0050.00316.68
8.0.250.0040.00416.94
8.0.240.0030.00616.95
8.0.230.0040.00416.91
8.0.220.0070.00016.79
8.0.210.0030.00316.77
8.0.200.0000.00716.81
8.0.190.0000.00816.81
8.0.180.0070.00016.93
8.0.170.0040.00416.86
8.0.160.0060.00316.92
8.0.150.0080.00016.93
8.0.140.0040.00416.88
8.0.130.0000.00613.35
8.0.120.0000.00716.84
8.0.110.0000.00716.77
8.0.100.0070.00016.70
8.0.90.0000.00716.95
8.0.80.0080.00816.89
8.0.70.0000.00716.92
8.0.60.0030.00316.75
8.0.50.0030.00516.89
8.0.30.0090.00916.97
8.0.20.0070.01117.40
8.0.10.0000.00817.01
8.0.00.0110.00716.59
7.4.330.0030.00315.02
7.4.320.0000.00716.57
7.4.300.0050.00216.55
7.4.290.0000.00716.61
7.4.280.0030.00316.58
7.4.270.0090.00016.51
7.4.260.0000.00716.58
7.4.250.0000.00816.36
7.4.240.0040.00316.46
7.4.230.0050.00216.52
7.4.220.0100.00716.68
7.4.210.0120.00616.50
7.4.200.0050.00316.49
7.4.190.0000.00716.73
7.4.160.0110.00516.50
7.4.150.0100.00717.40
7.4.140.0110.00917.86
7.4.130.0120.00616.44
7.4.120.0060.01216.36
7.4.110.0030.01216.52
7.4.100.0090.00916.66
7.4.90.0060.01216.48
7.4.80.0100.01019.39
7.4.70.0150.00716.64
7.4.60.0000.01616.42
7.4.50.0000.00716.41
7.4.40.0030.00522.77
7.4.30.0070.01016.61
7.4.00.0000.01014.74
7.3.330.0000.00613.23
7.3.320.0000.00613.18
7.3.310.0030.00316.29
7.3.300.0040.00416.20
7.3.290.0120.00316.28
7.3.280.0100.00416.29
7.3.270.0130.00917.40
7.3.260.0120.00616.38
7.3.250.0050.01216.43
7.3.240.0150.00316.50
7.3.230.0100.00816.50
7.3.210.0090.00616.47
7.3.200.0060.00919.39
7.3.190.0180.00416.30
7.3.180.0070.01016.43
7.3.170.0030.01316.38
7.3.160.0060.00916.40
7.3.120.0040.01115.14
7.2.330.0130.00416.72
7.2.320.0060.00916.39
7.2.310.0070.01116.33
7.2.300.0060.00916.67
7.2.290.0130.00316.46
7.2.00.0030.01119.58
7.1.200.0060.00915.86
7.1.100.1080.00316.34
7.1.70.0050.00217.21
7.1.60.0070.01819.82
7.1.50.0030.01916.66
7.1.00.0070.07322.47
7.0.200.0090.00316.80
7.0.140.0030.07322.01
7.0.60.0300.07720.01
7.0.50.0030.04017.72
7.0.40.0030.09320.11
7.0.30.0230.06720.14
7.0.20.0270.03720.15
7.0.10.0130.07020.10
7.0.00.0100.07320.09
5.6.280.0100.08720.90
5.6.210.0130.06020.72
5.6.200.0100.07318.17
5.6.190.0070.04020.41
5.6.180.0100.04720.57
5.6.170.0230.05320.47
5.6.160.0100.05020.50
5.6.150.0030.08318.21
5.6.140.0170.08018.28
5.6.130.0130.08018.20
5.6.120.0070.08320.97
5.6.110.0030.09321.10
5.6.100.0070.06721.01
5.6.90.0070.07020.95
5.6.80.0100.08020.43
5.5.350.0170.04020.37
5.5.340.0070.07317.95
5.5.330.0030.05020.32
5.5.320.0230.07720.30
5.5.310.0070.05320.50
5.5.300.0100.06017.98
5.5.290.0030.04017.98
5.5.280.0070.05020.77
5.5.270.0130.08020.88
5.5.260.0130.07720.83
5.5.250.0030.08320.69
5.5.240.0100.08320.23
5.4.450.0470.05019.39
5.4.440.0970.05719.46
5.4.430.0900.06319.44
5.4.420.0970.09019.47
5.4.410.0730.05719.50
5.4.400.0900.05319.31
5.4.390.0670.06019.15
5.4.380.0230.05718.81
5.4.370.0130.05318.75
5.4.360.0170.05018.55
5.4.350.0070.06318.80
5.4.340.0200.06318.62
5.4.320.0180.06812.48
5.4.310.0070.03912.47
5.4.300.0050.03912.48
5.4.290.0040.04412.47
5.4.280.0070.03312.37
5.4.270.0080.04112.38
5.4.260.0100.05018.91
5.4.250.0130.04718.80
5.4.240.0230.06018.94
5.4.230.0270.04719.00
5.4.220.0170.04718.99
5.4.210.0100.08018.95
5.4.200.0070.05719.09
5.4.190.0100.07318.90
5.4.180.0130.07318.78
5.4.170.0100.05319.00
5.4.160.0030.05718.93
5.4.150.0100.05318.79
5.4.140.0130.04716.58
5.4.130.0100.06716.40
5.4.120.0170.04316.58
5.4.110.0030.05316.57
5.4.100.0200.04016.38
5.4.90.0100.04316.46
5.4.80.0100.07316.33
5.4.70.0070.05316.47
5.4.60.0130.06016.49
5.4.50.0030.05016.51
5.4.40.0100.05016.50
5.4.30.0100.06716.62
5.4.20.0100.06716.32
5.4.10.0230.03716.38
5.4.00.0100.04716.00
5.3.290.0050.04012.80
5.3.280.0130.06014.57
5.3.270.0130.07314.59
5.3.260.0130.05014.70
5.3.250.0100.05014.68
5.3.240.0130.04314.67
5.3.230.0130.06714.67
5.3.220.0100.06714.65
5.3.210.0000.06014.73
5.3.200.0000.05714.72
5.3.190.0130.04714.72
5.3.180.0070.05014.46
5.3.170.0070.05014.60
5.3.160.0100.06314.46
5.3.150.0070.05014.64
5.3.140.0030.08014.63
5.3.130.0100.05314.63
5.3.120.0170.04314.68
5.3.110.0030.06314.62
5.3.100.0070.05313.86
5.3.90.0170.05714.23
5.3.80.0130.05714.00
5.3.70.0000.06013.98
5.3.60.0100.07013.98
5.3.50.0200.05314.03
5.3.40.0030.06713.94
5.3.30.0100.04313.99
5.3.20.0170.05713.86
5.3.10.0030.05013.64
5.3.00.0100.05013.70
5.2.170.0170.05011.21
5.2.160.0070.05311.21
5.2.150.0170.02711.27
5.2.140.0030.04711.35
5.2.130.0100.05011.08
5.2.120.0070.04011.18
5.2.110.0000.06011.18
5.2.100.0070.04311.07
5.2.90.0070.03711.15
5.2.80.0070.03711.15
5.2.70.0100.05011.15
5.2.60.0070.05311.21
5.2.50.0030.04311.09
5.2.40.0030.05011.07
5.2.30.0100.05311.04
5.2.20.0000.04310.90
5.2.10.0070.03711.03
5.2.00.0030.05710.68
5.1.60.0100.0409.84
5.1.50.0070.04010.04
5.1.40.0100.04710.06
5.1.30.0070.03310.55
5.1.20.0030.04010.42
5.1.10.0100.04010.15
5.1.00.0000.04710.11
5.0.50.0070.0378.43
5.0.40.0000.0308.43
5.0.30.0070.0437.99
5.0.20.0000.0378.27
5.0.10.0100.0278.23
5.0.00.0070.0478.07
4.4.90.0000.0277.47
4.4.80.0000.0337.47
4.4.70.0000.0277.47
4.4.60.0030.0207.47
4.4.50.0030.0207.47
4.4.40.0030.0407.47
4.4.30.0000.0237.47
4.4.20.0000.0237.47
4.4.10.0100.0237.47
4.4.00.0000.0377.47
4.3.110.0030.0307.47
4.3.100.0030.0207.47
4.3.90.0030.0207.47
4.3.80.0000.0377.47
4.3.70.0070.0277.47
4.3.60.0030.0277.47
4.3.50.0000.0307.47
4.3.40.0000.0377.47
4.3.30.0030.0277.47
4.3.20.0100.0237.47
4.3.10.0030.0277.47
4.3.00.0030.0338.11

preferences:
43.46 ms | 404 KiB | 6 Q