3v4l.org

run code in 300+ PHP versions simultaneously
<?php const COMMA = ','; const EMPTYSTR = ''; const NEWLINE_CHAR = '\n'; const ENDL = "\n"; $data = '1,2,3,\n,4,5,6,\n,7,8,9'; $strNumsEtc = str_replace( COMMA, EMPTYSTR, $data); $strArr = explode(NEWLINE_CHAR,$strNumsEtc); foreach ($strArr as $str) { echo $str,ENDL; } echo 'Shon',"\\\",NEWLINE_CHAR;

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)
5.4.340.2030.05018.92
5.4.320.2000.03719.13
5.4.310.1870.04318.88
5.4.300.2000.04018.88
5.4.290.1930.03319.05
5.4.280.2170.03718.92
5.4.270.1970.03718.91
5.4.260.2100.04019.09
5.4.250.2030.03019.07
5.4.240.2000.03719.23
5.4.230.2000.03319.09
5.4.220.1930.03719.09
5.4.210.1970.03718.77
5.4.200.2200.04719.24
5.4.190.1670.03318.91
5.4.180.0070.04019.24
5.4.170.0030.07018.87
5.4.160.0070.04718.76
5.4.150.1230.03719.11
5.4.140.1970.03316.32
5.4.130.2030.04016.16
5.4.120.1900.04316.27
5.4.110.2030.03316.43
5.4.100.2370.04016.39
5.4.90.2470.04716.18
5.4.80.2570.03716.07
5.4.70.2200.03016.44
5.4.60.2330.03716.36
5.4.50.2300.03716.43
5.4.40.2200.03716.36
5.4.30.2170.03016.35
5.4.20.1970.03016.44
5.4.10.1800.03716.15
5.4.00.1830.03315.63
5.3.290.1630.04714.71
5.3.280.0230.08014.55
5.3.270.0170.05714.55
5.3.260.0270.06714.70
5.3.250.0170.04014.63
5.3.240.0200.05014.46
5.3.230.0270.06714.46
5.3.220.0230.05014.50
5.3.210.0230.06314.54
5.3.200.0300.07014.43
5.3.190.0330.04014.51
5.3.180.0470.03314.57
5.3.170.0330.06714.61
5.3.160.0300.07014.55
5.3.150.0300.04014.42
5.3.140.0200.03714.61
5.3.130.0530.05714.53
5.3.120.0200.06014.39
5.3.110.0230.04314.50
5.3.100.0530.05713.98
5.3.90.0230.03713.97
5.3.80.0300.02714.09
5.3.70.0200.03313.85
5.3.60.0170.03714.05
5.3.50.0130.04013.73
5.3.40.0170.04313.92
5.3.30.0170.04013.84
5.3.20.0400.05313.64
5.3.10.0200.04313.61
5.3.00.0170.05313.47
5.2.170.0070.04311.20
5.2.160.0170.02711.16
5.2.150.0200.03311.19
5.2.140.0130.03310.98
5.2.130.0170.02711.15
5.2.120.0200.04310.94
5.2.110.0170.02711.11
5.2.100.0100.03311.04
5.2.90.0170.03011.16
5.2.80.0130.03711.10
5.2.70.0130.03310.96
5.2.60.0130.03311.20
5.2.50.0200.03011.10
5.2.40.0230.02311.15
5.2.30.0200.05710.81
5.2.20.0130.03011.11
5.2.10.0130.05710.77
5.2.00.0130.04710.68
5.1.60.0170.0439.92
5.1.50.0270.0179.86
5.1.40.0070.03010.03
5.1.30.0130.03010.41
5.1.20.0130.03010.35
5.1.10.0200.0379.96
5.1.00.0130.0309.96
5.0.50.0070.0338.49
5.0.40.0070.0208.39
5.0.30.0030.0378.20
5.0.20.0070.0378.11
5.0.10.0030.0278.32
5.0.00.0170.0208.23
4.4.90.0070.0137.70
4.4.80.0070.0137.70
4.4.70.0070.0277.70
4.4.60.0070.0177.70
4.4.50.0130.0137.70
4.4.40.0070.0237.70
4.4.30.0030.0137.70
4.4.20.0000.0177.70
4.4.10.0070.0107.70
4.4.00.0070.0277.70
4.3.110.0070.0137.70
4.3.100.0070.0177.70
4.3.90.0100.0107.70
4.3.80.0030.0277.70
4.3.70.0070.0137.70
4.3.60.0070.0137.70
4.3.50.0100.0137.70
4.3.40.0070.0237.70
4.3.30.0030.0137.70
4.3.20.0030.0137.70
4.3.10.0070.0137.70
4.3.00.0030.0137.70

preferences:
142.62 ms | 1394 KiB | 7 Q