protected function hasOffset($offset) { $offset = (string) $offset; return ctype_digit($offset) && $offset !== '0'; }