Voting

: min(three, seven)?
(Example: nine)

The Note You're Voting On

Bartek Ferek
8 years ago
As for taking first key of an array, it's much more efficient to RESET and then KEY, rather then RESET result of ARRAY_KEYS (as sugested by gardnerjohng at gmail dot com).

<?php
reset
($someArray);
echo
key($someArray);
?>

This will give the same result but is much much faster. Larger arrays, better performance. Tested on 100-elements long array with 16 times faster results.

<< Back to user notes page

To Top