3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* // Example 1 $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = explode(" ", $pizza); echo $pieces[0]; // piece1 echo 'PHP_EOL'; echo $pieces[1]; // piece2 echo PHP_EOL; // Example 2 $data = "foo:*:1023:1000::/home/foo:/bin/sh"; list($user, $pass, $uid, $gid, $gecos, $home, $shell) = explode(":", $data); echo $user; // foo echo PHP_EOL; echo $pass; // * echo PHP_EOL; */ $data = "https://www.evernote.com/shard/s7/sh/3d7d5fc3-ef4c-4ef1-b49b-833d2a944b3d/5bed95b61d2e414acba7eafce59382bf"; //evernote:///view/923142/s7/3d7d5fc3-ef4c-4ef1-b49b-833d2a944b3d/3d7d5fc3-ef4c-4ef1-b49b-833d2a944b3d/ list($one, $two, $three, $four, $five, $six, $seven, $eight) = explode("/",$data); echo $one; echo PHP_EOL; echo $two; echo PHP_EOL; echo $three; echo PHP_EOL; echo $four; echo PHP_EOL; echo $five; echo PHP_EOL; echo $six; echo PHP_EOL; echo $seven; echo PHP_EOL; echo $eight echo PHP_EOL; ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in /in/lDqaG on line 38
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.28
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in /in/lDqaG on line 38
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' in /in/lDqaG on line 38
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/lDqaG on line 38
Process exited with code 255.