3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $target = ''; $paramsToStrip = array(); $_GET = array('foo' => 'mööü', 'foooo' => 'sds'); if (!empty($_GET)) { $targetParams = array_diff_key($_GET, array_flip($paramsToStrip)); if (!empty($targetParams)) { $target = '?' . http_build_query($targetParams); } } var_dump($target);
Output for 5.1.0 - 7.1.0
string(34) "?foo=m%C3%B6%C3%B6%C3%BC&foooo=sds"
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function array_diff_key() in /in/07f74 on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_diff_key() in /in/07f74 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_diff_key() in /in/07f74 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_diff_key() in /in/07f74 on line 9