Skip to content

Instantly share code, notes, and snippets.

@r37r0m0d3l
Created September 12, 2012 10:38
Show Gist options
  • Save r37r0m0d3l/3705854 to your computer and use it in GitHub Desktop.
Save r37r0m0d3l/3705854 to your computer and use it in GitHub Desktop.
Array dereferencing in php < 5.4
<?php
function ad($array, $index)
{
return array_key_exists($index, $array) ? $array[$index] : null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment