|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-12-04 00:25 UTC] mail+php at requinix dot net
[2012-12-09 01:46 UTC] levim@php.net
-Status: Open
+Status: Duplicate
[2012-12-09 01:46 UTC] levim@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
Description: ------------ $SplObjectStorage->current() returns different value from current($SplObjectStorage). Test script: --------------- class test { public $val; public function __construct() { $this->val = rand(); } } class blat extends \SplObjectStorage { public function add() { $this->attach(new test()); } } $blat = new blat(); $blat->add(); $blat->add(); $blat->add(); $blat->add(); var_dump($blat->current() === current($blat)); // null === false Expected result: ---------------- true Actual result: -------------- false