Edit report at https://bugs.php.net/bug.php?id=60759&edit=1

 ID:                 60759
 Updated by:         dragoo...@php.net
 Reported by:        dragoo...@php.net
-Summary:            SplDoublyLinkedList->reset()
+Summary:            SplDoublyLinkedList->clear()
 Status:             Open
 Type:               Feature/Change Request
 Package:            SPL related
 Operating System:   N/A
 PHP Version:        5.4.0RC5
 Block user comment: N
 Private report:     N

 New Comment:

Renaming the reset() method to clear()


Previous Comments:
------------------------------------------------------------------------
[2012-01-15 03:26:24] dragoo...@php.net

Description:
------------
The patch adds a reset() method to the SplDoublyLinkedList class.
This allows the internal list to be wiped cleaned for reuse.

Test script:
---------------
<?php
$d = new SplDoublyLinkedList();
$d->push(5);
var_dump($d->count());
$d->reset();
var_dump($d->count());

int(1)
int(0)

Actual result:
--------------
<?php
$d = new SplDoublyLinkedList();
$d->push(5);
var_dump($d->count());
$d->reset();
var_dump($d->count());

int(1)
int(0)


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60759&edit=1

Reply via email to