3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $output = array_slice(array_merge(explode(' | ', $input), array(null)), 0, 2); $output = array_slice(explode(" | ", "$input | "), 0, 2); $input = 'one'; print_r($output); $input = 'one | two'; print_r($output); $input = 'one | two | three'; print_r($output); $input = 'one | two | three | '; print_r($output);

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.0070.00718.68
8.3.50.0060.01021.91
8.3.40.0070.01418.67
8.3.30.0070.01418.68
8.3.20.0080.00018.71
8.3.10.0040.00419.19
8.3.00.0040.00423.65
8.2.180.0100.01016.50
8.2.170.0030.01022.96
8.2.160.0000.01420.43
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0040.00419.77
8.2.110.0030.00620.51
8.2.100.0120.00017.91
8.2.90.0060.00319.21
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0050.00317.92
8.2.50.0000.00918.07
8.2.40.0040.00418.09
8.2.30.0040.00421.32
8.2.20.0040.00417.71
8.2.10.0030.00517.83
8.2.00.0060.00317.70
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0030.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00622.55
8.1.230.0090.00320.98
8.1.220.0080.00018.77
8.1.210.0040.00418.84
8.1.200.0030.00617.23
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0050.00318.51
8.1.160.0000.00718.73
8.1.150.0040.00418.62
8.1.140.0080.00017.26
8.1.130.0070.00017.84
8.1.120.0040.00417.46
8.1.110.0000.00817.38
8.1.100.0040.00417.45
8.1.90.0040.00417.36
8.1.80.0000.00717.37
8.1.70.0070.00017.34
8.1.60.0040.00417.46
8.1.50.0070.00017.34
8.1.40.0060.00317.36
8.1.30.0040.00417.50
8.1.20.0030.00517.61
8.1.10.0020.00517.38
8.1.00.0040.00417.36
8.0.300.0000.00719.99
8.0.290.0040.00417.18
8.0.280.0080.00018.43
8.0.270.0030.00317.23
8.0.260.0030.00616.73
8.0.250.0000.00716.91
8.0.240.0030.00616.89
8.0.230.0030.00317.07
8.0.220.0030.00316.93
8.0.210.0070.00016.98
8.0.200.0000.00617.02
8.0.190.0070.00016.89
8.0.180.0040.00416.98
8.0.170.0050.00317.01
8.0.160.0030.00316.95
8.0.150.0030.00316.78
8.0.140.0080.00016.91
8.0.130.0000.00513.36
8.0.120.0040.00416.81
8.0.110.0040.00416.92
8.0.100.0040.00417.00
8.0.90.0000.00716.89
8.0.80.0160.00316.93
8.0.70.0000.00716.88
8.0.60.0000.00716.89
8.0.50.0070.00016.77
8.0.30.0130.00517.08
8.0.20.0110.01117.40
8.0.10.0040.00416.94
8.0.00.0090.00916.70
7.4.330.0000.00514.71
7.4.320.0030.00316.58
7.4.300.0000.00616.44
7.4.290.0000.00616.52
7.4.280.0050.00216.43
7.4.270.0040.00416.57
7.4.260.0030.00313.20
7.4.250.0060.00316.54
7.4.240.0000.00716.42
7.4.230.0000.00716.61
7.4.220.0080.01216.59
7.4.210.0070.00816.47
7.4.200.0000.00816.63
7.4.190.0040.00416.60
7.4.160.0090.00616.38
7.4.150.0160.00317.40
7.4.140.0130.00817.86
7.4.130.0070.01016.45
7.4.120.0130.00816.55
7.4.110.0070.01016.47
7.4.100.0000.01816.34
7.4.90.0110.00616.44
7.4.80.0100.01419.39
7.4.70.0100.00716.43
7.4.60.0040.01516.43
7.4.50.0050.00016.57
7.4.40.0140.00322.52
7.4.30.0090.01216.40
7.4.00.0030.01014.78
7.3.330.0030.00313.01
7.3.320.0000.00513.09
7.3.310.0030.00316.26
7.3.300.0030.00316.27
7.3.290.0170.00316.25
7.3.280.0070.00916.25
7.3.270.0070.01017.40
7.3.260.0060.01418.24
7.3.250.0130.00716.41
7.3.240.0100.01016.28
7.3.230.0100.00716.39
7.3.210.0140.00316.32
7.3.200.0150.00316.16
7.3.190.0130.00316.28
7.3.180.0120.00316.23
7.3.170.0120.00616.37
7.3.160.0150.00316.31
7.3.120.0040.01214.98
7.3.10.0110.00016.41
7.3.00.0090.00616.62
7.2.330.0120.00616.53
7.2.320.0060.01316.66
7.2.310.0030.01616.57
7.2.300.0130.00316.34
7.2.290.0090.00916.57
7.2.130.0100.00716.52
7.2.120.0000.01616.98
7.2.110.0040.01016.91
7.2.100.0140.00316.50
7.2.90.0160.00716.59
7.2.80.0100.00716.67
7.2.70.0120.00816.89
7.2.60.0060.00616.77
7.2.50.0120.00016.81
7.2.40.0040.01116.87
7.2.30.0000.01216.73
7.2.20.0090.00316.92
7.2.10.0060.00616.65
7.2.00.0060.00918.04
7.1.250.0050.00515.51
7.1.100.0030.00717.82
7.1.70.0000.00716.98
7.1.60.0110.01419.40
7.1.50.0140.01116.95
7.1.00.0030.05322.51
7.0.200.0030.00316.66
7.0.140.0070.06721.92
7.0.70.0030.08321.66
7.0.60.0030.04321.63
7.0.50.0070.06722.15
7.0.40.0030.07720.14
7.0.30.0070.05719.95
7.0.20.0100.07020.14
7.0.10.0000.07020.00
7.0.00.0000.07320.04
5.6.280.0030.07320.77
5.6.220.0070.04720.50
5.6.210.0030.07020.58
5.6.200.0070.06721.01
5.6.190.0000.08321.13
5.6.180.0100.05720.94
5.6.170.0070.07021.05
5.6.160.0000.08321.07
5.6.150.0070.08021.07
5.6.140.0030.04021.07
5.6.130.0030.04021.10
5.6.120.0030.08721.04
5.6.110.0000.07021.01
5.6.100.0000.06320.98
5.6.90.0130.08020.98
5.6.80.0070.05320.48
5.6.70.0000.06020.30
5.6.60.0000.08720.37
5.6.50.0100.06020.54
5.6.40.0130.07720.38
5.6.30.0030.07720.29
5.6.20.0030.08020.38
5.6.10.0100.06720.43
5.6.00.0100.07020.27
5.5.360.0070.06020.35
5.5.350.0030.08720.33
5.5.340.0030.05720.78
5.5.330.0100.07320.91
5.5.320.0000.05020.91
5.5.310.0000.07320.77
5.5.300.0070.03720.82
5.5.290.0100.08020.90
5.5.280.0100.07720.76
5.5.270.0000.09020.74
5.5.260.0000.08720.81
5.5.250.0000.07320.71
5.5.240.0070.04720.23
5.5.230.0100.06720.22
5.5.220.0030.07020.27
5.5.210.0070.06720.19
5.5.200.0000.05320.17
5.5.190.0070.08020.25
5.5.180.0030.08320.17
5.5.160.0070.07020.20
5.5.150.0070.06320.06
5.5.140.0100.07320.13
5.5.130.0030.06720.22
5.5.120.0070.06320.22
5.5.110.0030.07020.11
5.5.100.0000.08320.15
5.5.90.0100.06720.05
5.5.80.0030.07720.03
5.5.70.0000.08320.02
5.5.60.0030.05019.92
5.5.50.0100.03720.07
5.5.40.0030.05320.07
5.5.30.0000.06720.01
5.5.20.0030.07720.03
5.5.10.0030.04320.03
5.5.00.0000.04019.95
5.4.450.0030.07019.35
5.4.440.0000.08319.39
5.4.430.0030.08019.22
5.4.420.0030.06319.35
5.4.410.0100.07019.23
5.4.400.0100.06719.09
5.4.390.0030.06018.90
5.4.380.0000.08719.04
5.4.370.0070.07018.86
5.4.360.0000.06319.12
5.4.350.0000.05318.90
5.4.340.0000.08019.12
5.4.320.0100.07018.87
5.4.310.0070.04718.84
5.4.300.0130.05719.17
5.4.290.0030.06718.94
5.4.280.0070.06719.02
5.4.270.0070.07719.15
5.4.260.0070.07719.02
5.4.250.0000.06019.13
5.4.240.0030.08019.02
5.4.230.0070.07019.14
5.4.220.0000.07019.07
5.4.210.0000.04019.22
5.4.200.0070.04718.86
5.4.190.0030.07319.03
5.4.180.0030.06019.10
5.4.170.0070.04719.01
5.4.160.0030.05019.02
5.4.150.0070.05318.92
5.4.140.0000.06016.36
5.4.130.0000.03716.35
5.4.120.0000.05016.38
5.4.110.0030.05316.46
5.4.100.0000.03716.38
5.4.90.0030.03316.42
5.4.80.0100.06316.31
5.4.70.0070.03016.46
5.4.60.0000.03716.48
5.4.50.0100.04016.43
5.4.40.0000.04716.49
5.4.30.0000.06016.30
5.4.20.0000.04016.30
5.4.10.0030.07716.36
5.4.00.0100.04015.63
5.3.290.0000.08014.77
5.3.280.0070.07314.77
5.3.270.0000.04714.77
5.3.260.0070.04714.77
5.3.250.0000.08014.77
5.3.240.0030.06014.77
5.3.230.0030.05714.77
5.3.220.0070.04314.77
5.3.210.0030.05314.77
5.3.200.0030.03714.77
5.3.190.0000.05014.77
5.3.180.0100.05314.77
5.3.170.0030.04314.77
5.3.160.0000.04714.77
5.3.150.0030.04014.77
5.3.140.0000.07714.77
5.3.130.0000.07314.77
5.3.120.0000.05314.77
5.3.110.0030.05014.77
5.3.100.0100.06314.77
5.3.90.0030.05014.77
5.3.80.0000.07314.77
5.3.70.0000.07314.77
5.3.60.0100.06714.77
5.3.50.0000.06714.77
5.3.40.0000.07314.77
5.3.30.0030.07714.77
5.3.20.0030.07314.77
5.3.10.0000.07014.77
5.3.00.0000.05714.77
5.2.170.0030.03014.77
5.2.160.0070.05714.77
5.2.150.0070.03714.77
5.2.140.0030.04314.77
5.2.130.0070.05714.77
5.2.120.0000.06014.77
5.2.110.0000.06314.77
5.2.100.0030.04314.77
5.2.90.0030.05714.77
5.2.80.0070.05014.77
5.2.70.0030.04314.77
5.2.60.0070.06014.77
5.2.50.0030.05314.77
5.2.40.0000.04314.77
5.2.30.0030.06014.77
5.2.20.0070.05014.77
5.2.10.0000.06314.77
5.2.00.0070.06014.77
5.1.60.0000.04314.77
5.1.50.0000.05714.77
5.1.40.0030.05314.77
5.1.30.0000.05714.77
5.1.20.0030.03314.77
5.1.10.0000.03014.77
5.1.00.0000.02714.77
5.0.50.0000.04014.77
5.0.40.0030.03314.77
5.0.30.0000.06014.77
5.0.20.0000.03314.77
5.0.10.0000.03714.77
5.0.00.0070.06314.77
4.4.90.0030.01714.77
4.4.80.0000.03014.77
4.4.70.0030.03314.77
4.4.60.0000.02014.77
4.4.50.0000.04014.77
4.4.40.0000.05714.77
4.4.30.0000.04014.77
4.4.20.0000.03714.77
4.4.10.0000.03314.77
4.4.00.0030.05014.77
4.3.110.0000.03314.77
4.3.100.0000.03014.77
4.3.90.0030.03314.77
4.3.80.0000.04714.77
4.3.70.0000.01714.77
4.3.60.0000.03714.77
4.3.50.0030.02314.77
4.3.40.0000.04714.77
4.3.30.0030.02714.77
4.3.20.0070.03014.77
4.3.10.0000.04014.77
4.3.00.0000.03014.77

preferences:
47.45 ms | 401 KiB | 5 Q