3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $keys = array( "a" => 1, "c" =>2, ); $keyToken = 1; if (is_array($keys)) { unset($keys[array_search($keyToken, $keys)]); } else { $keys = array(); }
Output for 5.3.20 - 7.2.0