3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'app/users/edit/John%20Doe'; $url1 = filter_var($url, FILTER_SANITIZE_URL); $url2 = str_replace('%20', ' ', $url); var_dump($url); var_dump($url1); var_dump($url2);
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(25) "app/users/edit/John%20Doe" string(25) "app/users/edit/John%20Doe" string(23) "app/users/edit/John Doe"
Output for 5.0.0 - 5.1.6
<br /> <b>Fatal error</b>: Call to undefined function filter_var() in <b>/in/XVN3G</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: filter_var() in <b>/in/XVN3G</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: filter_var() in <b>/in/XVN3G</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: filter_var() in <b>/in/XVN3G</b> on line <b>6</b><br />