php-src/ext/spl/tests/bug61453.phpt
Gustavo André dos Santos Lopes 0f001703a8 Fixed bug #61453.
The "hash" function used strncpy on data that would have NUL bytes, ending the
copy prematurely and causing collisions between objects.
2012-03-21 12:42:09 +00:00

20 lines
351 B
PHP

--TEST--
Bug #61453: SplObjectStorage does not identify objects correctly
--FILE--
<?php
$limit = 1000;
$objects = new SplObjectStorage;
for($i = 0; $i < $limit; $i++){
$object = new StdClass;
if(isset($objects[$object])){
die("this should never happen, but did after $i iteration");
}
$objects[$object] = 1;
}
?>
==DONE==
--EXPECT--
==DONE==