Re: note 38720 added to function.array-splice

From: Date: Mon, 05 Jan 2004 04:48:58 +0000
Subject: Re: note 38720 added to function.array-splice
References: 1 2  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357928@lists.php.net to get a copy of this message
From: "Ken Tossell" <ken@tossell.net> ... > On Sun, 4 Jan 2004 bharat@menalto.com wrote: > > > The example says that: > > array_shift($input) > > > > is equivalent to: > > array_splice($input, -1) > > > > but that's not right. it's equivalent to: > > array_splice($input, 0, 1) > > This is true, assuming you're talking about the effect it has on $input, > rather than the array which it returns. I'll try to clear that up. Right. And since the manual page gives the same exact example for array_pop() (in the line directly above the array_shift example) it's ambiguous whether the example refers to the $input or the returned value. -Bharat

« previous php.doc (#969357928) next »