Fixed support for PHP next(...) builtin function

- Now returns the element value after advancing the internal pointer
- Returns false when advanced past end of array