#22557 [Asn->Bgs]: array_spilce($arr,0,0) deletes whole array

From: Date: Wed, 05 Mar 2003 20:34:26 +0000
Subject: #22557 [Asn->Bgs]: array_spilce($arr,0,0) deletes whole array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34922@lists.php.net to get a copy of this message
ID: 22557 Updated by: moriyoshi@php.net Reported By: bitworks at freenet dot de -Status: Assigned +Status: Bogus Bug Type: Arrays related Operating System: Linux Debian 3.0, WAMP, LINUX Su PHP Version: 4CVS-2003-03-05 5CVS-2003-03-05 Assigned To: moriyoshi New Comment: Huh, use array_splice($oldarr, 0, count($oldarr)) instead. That turned out to just be the intended behaviour. Previous Comments: ------------------------------------------------------------------------ [2003-03-05 13:58:36] bitworks at freenet dot de Hello, in former Versions the function array_splice() was able to reindex an array typing $newarr=array_splice($oldarr,0,0) Now this function deletes all elements from array. How to reindex an array in php 4.3.1 ? Regards Tom bitworks Braunschweig DE PS: I didn't found solutions for this Problem. I also posted in selfforum.teamone.de ------------------------------------------------------------------------ [2003-03-05 13:56:42] bitworks at freenet dot de Hello, in former Versions the function array_splice() was able to reindex an array typing $newarr=($oldarr,0,0) Now this function deletes all elements from array. How to reindex an array in php 4.3.1 ? Regards Tom bitworks Braunschweig DE PS: I didn't found solutions for this Problem. I also posted in selfforum.teamone.de ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22557&edit=1

« previous php.bugs (#34922) next »