Why Does PHP current() Return NULL in an Empty Array? Underlying Reasons Explained
current() is not simply a function to fetch the first element of an array; it relies on an internal mechanism. Each PHP array maintains a pointer that refers to the “current element.” The purpose of current() is to return the value that this pointer references.
current