function head($arr)libphutil Technical Documentation (Core Utilities)
function head($arr)
libphutil Technical Documentation (Core Utilities)
Returns the first element of an array. Exactly like reset(), but doesn't choke if you pass it some non-referenceable value like the return value of a function.
Parameters
array | $arr | Array to retrieve the first element from. |
Return
wild | The first value of the array. |
- Defined
- src/utils/utils.php:818