ArrayIterator does not clone itself
| Bug #36941 | ArrayIterator does not clone itself | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-04-01 16:29 UTC | Modified: | 2006-04-04 19:53 UTC | ||
| From: | ce at netage dot bg | Assigned: | helly (profile) | ||
| Status: | Closed | Package: | SPL related | ||
| PHP Version: | 5.1.3RC2 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2006-04-01 16:29 UTC] ce at netage dot bg
Description: ------------ ArrayIterator does not clone itself Reproduce code: --------------- $a = new ArrayIterator(); $a[] = 1; $b = clone $a; var_dump($a[0], $b[0]); $b[0] = $b[0] + 1; var_dump($a[0], $b[0]); Expected result: ---------------- int(1) int(1) int(1) int(2) Actual result: -------------- int(1) int(1) int(2) int(2)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-04-02 17:11 UTC] helly@php.net
[2006-04-04 19:53 UTC] helly@php.net