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 'evernote:///view/923142/s7/'.$seven.'/'.$seven.'/'; ?>
Output for 4.3.0 - 7.1.0
evernote:///view/923142/s7/3d7d5fc3-ef4c-4ef1-b49b-833d2a944b3d/3d7d5fc3-ef4c-4ef1-b49b-833d2a944b3d/