Bug #12116 Updated: Array_slice acts as array_splice

From: Date: Thu, 12 Jul 2001 22:05:38 +0000
Subject: Bug #12116 Updated: Array_slice acts as array_splice
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59882@lists.php.net to get a copy of this message
ID: 12116 Updated by: derick Reported By: tom@fluxxx.com Old Status: Status: Bogus Bug Type: Unknown/Other Function Operating System: Win2k Server Advance/ IIS 5.0 PHP Version: 4.0.6 New Comment: Not a bug, so bogus Previous Comments: ------------------------------------------------------------------------ [2001-07-12 17:44:36] tom@fluxxx.com I misunderstood the functionality of array_slice and array_splice. This behavior is as intended. ------------------------------------------------------------------------ [2001-07-12 17:37:38] tom@fluxxx.com //returns pear $f=array("orange","apple","pear","banana"); $output=array_splice($f,2,1); foreach($output as $d){ echo $d."<BR>"; } //also returns pear $f=array("orange","apple","pear","banana"); $output=array_slice($f,2,1); foreach($output as $d){ echo $d."<BR>"; } ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12116&edit=1

« previous php.dev (#59882) next »