You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.
If I use an array object, I am no longer able to use any of the array functions that PHP provides.
$array = newArrayObject();
// Warning: array_search() expects parameter 2 to be array, object given$index = array_search(123, $array);
Resolution
Implement the available array functions with support for any ArrayAccess or Iterator implementation. The implementations should default to use PHP's array_ functions if an actual array is provided.
Some functions produce new arrays. Since array objects can have keys that are invalid for normal arrays, it may not be possible to return a normal array. Should the functions default to using AnyKey for new arrays?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
If I use an array object, I am no longer able to use any of the array functions that PHP provides.
Resolution
Implement the available array functions with support for any
ArrayAccess
orIterator
implementation. The implementations should default to use PHP'sarray_
functions if an actual array is provided.References
The text was updated successfully, but these errors were encountered: