Skip to content

Instantly share code, notes, and snippets.

@rvasilevsk
Created July 5, 2020 15:12
Show Gist options
  • Save rvasilevsk/645e4ff18ae688687ae4d9794b79fbc2 to your computer and use it in GitHub Desktop.
Save rvasilevsk/645e4ff18ae688687ae4d9794b79fbc2 to your computer and use it in GitHub Desktop.
[arr_stuff.php] #php #array
function arrGet($arr, $key, $default = null)
{
return isset($arr[$key]) ? $arr[$key] : $default;
}
function arrAny()
{
foreach (func_get_args() as $arg) {
if ($arg) return $arg;
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment