3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = "http://somedomain/somefolder/someresoure/somemodel/someaction/id?option=1&sales=4%206"; $apart = explode('/',$url); foreach ($apart as $key => $val) { echo 'key: ' . $key . ', value: ' . $val . '.....'; } print_r(parse_url(url_decode($url))); ?>
based on GJqnJ
Output for 7.0.0 - 7.1.0
key: 0, value: http:.....key: 1, value: .....key: 2, value: somedomain.....key: 3, value: somefolder.....key: 4, value: someresoure.....key: 5, value: somemodel.....key: 6, value: someaction.....key: 7, value: id?option=1&sales=4%206..... Fatal error: Uncaught Error: Call to undefined function url_decode() in /in/SUP1k:14 Stack trace: #0 {main} thrown in /in/SUP1k on line 14
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.12.0
key: 0, value: http:.....key: 1, value: .....key: 2, value: somedomain.....key: 3, value: somefolder.....key: 4, value: someresoure.....key: 5, value: somemodel.....key: 6, value: someaction.....key: 7, value: id?option=1&sales=4%206..... Fatal error: Call to undefined function url_decode() in /in/SUP1k on line 14
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.5 - 4.4.9
key: 0, value: http:.....key: 1, value: .....key: 2, value: somedomain.....key: 3, value: somefolder.....key: 4, value: someresoure.....key: 5, value: somemodel.....key: 6, value: someaction.....key: 7, value: id?option=1&sales=4%206..... Fatal error: Call to undefined function: url_decode() in /in/SUP1k on line 14
Process exited with code 255.
Output for 4.3.2 - 4.4.4
key: 0, value: http:.....key: 1, value: .....key: 2, value: somedomain.....key: 3, value: somefolder.....key: 4, value: someresoure.....key: 5, value: somemodel.....key: 6, value: someaction.....key: 7, value: id?option=1&sales=4%206..... Fatal error: Call to undefined function: url_decode() in /in/SUP1k on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1
key: 0, value: http:.....key: 1, value: .....key: 2, value: somedomain.....key: 3, value: somefolder.....key: 4, value: someresoure.....key: 5, value: somemodel.....key: 6, value: someaction.....key: 7, value: id?option=1&sales=4%206..... Fatal error: Call to undefined function: url_decode() in /in/SUP1k on line 14