|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60759 SplDoublyLinkedList->clear()
Submitted: 2012-01-15 03:26 UTC Modified: 2017-10-24 08:09 UTC
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: Assigned:
Status: Open Package: SPL related
PHP Version: 5.4.0RC5 OS: N/A
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-01-15 03:26 UTC]
The patch adds a reset() method to the SplDoublyLinkedList class.
This allows the internal list to be wiped cleaned for reuse.

Test script:
$d = new SplDoublyLinkedList();


Actual result:
$d = new SplDoublyLinkedList();



spl_dllist_clear (last revision 2012-01-15 22:37 UTC by
spl_dllist_reset (last revision 2012-01-15 03:26 UTC by dragoonis)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-15 22:29 UTC]
-Summary: SplDoublyLinkedList->reset() +Summary: SplDoublyLinkedList->clear()
 [2012-01-15 22:29 UTC]
Renaming the reset() method to clear()
 [2012-01-15 22:37 UTC]
I think it's much more appropriate to rename this to clear() as it implies wiping 
contents of something. The original idea of reset() wasn't a good one as the term 
'reset' in PHP usually refers to resetting an internal pointer of a list.

New patch attached as spl_dllist_clear.
 [2012-01-15 22:37 UTC]
The following patch has been added/updated:

Patch Name: spl_dllist_clear
Revision:   1326667071
 [2012-07-28 22:12 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: colder
 [2012-07-28 22:14 UTC]
Thanks for getting this merged into a version branch Felipe. Paul.
 [2012-07-28 22:29 UTC]
It hasn't been merged, yet. Just assigned to the SPL maintainer.
 [2014-02-27 04:54 UTC]
-Assigned To: colder +Assigned To: levim
 [2017-10-24 08:09 UTC]
-Status: Assigned +Status: Open -Assigned To: levim +Assigned To:
 [2018-07-13 13:16 UTC] shrinivas dot mahindrakar at viztarinternationa
// $cmd = path of my project file 

if (substr(php_uname(), 0, 7) == "Windows"){ 
     pclose(popen("start /MIN ". $cmd, "r"));  
  exec($cmd . " > /dev/null &");   

the same code is working in local system but in server its waiting for cmd and the code is not working
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 06:01:24 2020 UTC