3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = ' ;Head admins "Username" "Password" "abcdefghijk" "ab" "Username2" "Password2" "abcdehl" "ab" ;Admins "Admin" "Password" "abcd" "ab" '; $arr = explode("\n;", $str); foreach($arr as $section){ $lines = explode("\n", $section); array_shift($lines); $l = explode('"', $lines); foreach($lines as $line) print $l[0]; print $line . "\n"; }
Output for 5.5.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17 Notice: Undefined variable: line in /in/JiHHf on line 21 Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17 Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17
Output for 5.3.1 - 5.4.45
Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17 Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17 Warning: explode() expects parameter 2 to be string, array given in /in/JiHHf on line 17
Output for 4.3.0 - 5.3.0
ArrayArrayArray ArrayArray