John Butler wrote:
It is annoying working with arrays sometimes, as some functions work
the actual array, while others return the results of working on the
array without changing anything. Is there any particular reason for
...you mean what are the reasons for the different ways the arrays work?
Then you must be asking the list in general (not me ;-))
Efficiency is often one of the reasons. Do you really want the overhead
incurred by returning a copy of a 50000 member. Most of the sort
functions work on the array itself.
By working on the array itself, PHP offers you, the programmer, the
choice of incurring the overhead since you can copy it before sorting.
Application and Templating Framework for PHP
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php