php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22557 array_spilce($arr,0,0) deletes whole array
Submitted: 2003-03-05 13:56 UTC Modified: 2003-03-05 14:34 UTC
From: bitworks at freenet dot de Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4CVS-2003-03-05 5CVS-2003-03-05 OS: Linux Debian 3.0, WAMP, LINUX Su
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bitworks at freenet dot de
New email:
PHP Version: OS:

 

 [2003-03-05 13:56 UTC] 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





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-05 13:58 UTC] 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 14:34 UTC] moriyoshi@php.net
Huh, use array_splice($oldarr, 0, count($oldarr)) instead.
That turned out to just be the intended behaviour.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC