php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4818 var_dump() does not keep cursor in arrays
Submitted: 2000-06-05 08:31 UTC Modified: 2000-06-09 17:22 UTC
From: waldschrott at kiffen dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.0 Release OS: win2000
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: waldschrott at kiffen dot de
New email:
PHP Version: OS:

 

 [2000-06-05 08:31 UTC] waldschrott at kiffen dot de
var_dump() should not touch the cursors in arrays, it should work with a copy of this arrays, it should not manipulate them directly, performance is not needed using var_dump() - I think.
One has to reset() every array after using var_dump(), it this is expected behaviour, it should be documented.

Expected result: ab[dumped stuff]c
Current result: ab[dumped stuff]

<?php
$t=array('a','b','c','d');
print reset($t);
print next($t);
var_dump($t);
print next($t);
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-09 17:22 UTC] zeev at cvs dot php dot net
Fixed, thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 12 16:01:35 2024 UTC