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.0090.03212.01
5.4.320.0080.03512.50
5.4.310.0040.04012.50
5.4.300.0050.03712.50
5.4.290.0100.04012.49
5.4.280.0090.03812.39
5.4.270.0070.03812.39
5.4.260.0100.04612.39
5.4.250.0100.03512.39
5.4.240.0070.04012.39
5.4.230.0110.04112.39
5.4.220.0190.05712.38
5.4.210.0080.05212.39
5.4.200.0070.04312.39
5.4.190.0100.07812.38
5.4.180.0100.05112.38
5.4.170.0070.04512.39
5.4.160.0290.09112.39
5.4.150.0110.04312.38
5.4.140.0090.04212.07
5.4.130.0070.04012.05
5.4.120.0060.04012.02
5.4.110.0170.09212.01
5.4.100.0200.11412.02
5.4.90.0190.07812.02
5.4.80.0180.07212.01
5.4.70.0070.07312.01
5.4.60.0150.07712.01
5.4.50.0100.06112.01
5.4.40.0140.06812.00
5.4.30.0190.07011.99
5.4.20.0090.06011.99
5.4.10.0090.04312.00
5.4.00.0070.04411.49
5.3.290.0130.05412.80
5.3.280.0110.05712.71
5.3.270.0200.07212.72
5.3.260.0060.04712.72
5.3.250.0150.05812.72
5.3.240.0080.04512.71
5.3.230.0070.03912.71
5.3.220.0070.04712.68
5.3.210.0090.03912.68
5.3.200.0100.05112.68
5.3.190.0120.04212.68
5.3.180.0150.05812.67
5.3.170.0090.04412.67
5.3.160.0150.05412.67
5.3.150.0090.04712.68
5.3.140.0070.06212.66
5.3.130.0090.05212.66
5.3.120.0070.03912.66
5.3.110.0070.04012.66
5.3.100.0060.04412.12
5.3.90.0080.03912.09
5.3.80.0110.03712.07
5.3.70.0060.03812.07
5.3.60.0050.04512.07
5.3.50.0050.03712.00
5.3.40.0040.04112.00
5.3.30.0100.03511.95
5.3.20.0070.03711.73
5.3.10.0090.03611.70
5.3.00.0080.03611.69
5.2.170.0040.0329.18
5.2.160.0070.0409.19
5.2.150.0060.0329.19
5.2.140.0050.0319.18
5.2.130.0090.0269.14
5.2.120.0030.0319.13
5.2.110.0030.0319.15
5.2.100.0070.0299.14
5.2.90.0040.0309.14
5.2.80.0050.0309.14
5.2.70.0060.0299.14
5.2.60.0040.0329.09
5.2.50.0040.0359.05
5.2.40.0080.0279.04
5.2.30.0070.0279.02
5.2.20.0040.0319.00
5.2.10.0070.0298.93
5.2.00.0070.0318.78
5.1.60.0030.0278.07
5.1.50.0030.0278.07
5.1.40.0050.0258.05
5.1.30.0080.0248.40
5.1.20.0040.0288.42
5.1.10.0050.0268.14
5.1.00.0120.0618.14
5.0.50.0100.0326.62
5.0.40.0060.0316.48
5.0.30.0030.0616.29
5.0.20.0030.0296.27
5.0.10.0080.0416.24
5.0.00.0030.0416.23
4.4.90.0030.0154.78
4.4.80.0050.0144.75
4.4.70.0030.0174.76
4.4.60.0040.0164.75
4.4.50.0030.0154.77
4.4.40.0090.0294.71
4.4.30.0050.0184.76
4.4.20.0050.0134.85
4.4.10.0040.0214.85
4.4.00.0040.0274.76
4.3.110.0040.0154.67
4.3.100.0020.0154.66
4.3.90.0020.0154.64
4.3.80.0020.0254.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0050.0224.54
4.3.30.0010.0173.29
4.3.20.0010.0173.26
4.3.10.0010.0183.22
4.3.00.0000.0236.98

preferences:
165.87 ms | 1394 KiB | 7 Q