On Sat, 2009-08-08 at 12:18 -0400, Robert Cummings wrote: > John Butler wrote: > >> It is annoying working with arrays sometimes, as some functions work > >> on > >> the actual array, while others return the results of working on the > >> array without changing anything. Is there any particular reason for > >> that? > > > > ...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. > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP > That makes sense. Thanks, Ash http://www.ashleysheridan.co.uk