Is there a lightweight replacement for PHP's array
to be used when I don't need any of the associated array functionality? From what I know, array
is a hash map internally, which is excessive and inefficient for storing a simple array of elements. If PHP had a class or programming construct similar to C++'s std::vector
, it would be just great.
Reference: http://www.cplusplus.com/reference/vector/vector/
Have a look at SPL datastructures. An example is http://www.php.net/manual/en/class.splfixedarray.php which is faster than normal array.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments