What do you think about this `first` implementation? https://github.com/pablodip/felpado/blob/master/src/functions/first.php

You avoid counting and relying on the 0 key.