mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

The object hash is not particularly useful (anymore) and just clutters the output. It encodes the same information as the object ID, which is already part of the output.
33 lines
574 B
PHP
33 lines
574 B
PHP
--TEST--
|
|
Reference to SplObjectStorage key (not supported)
|
|
--FILE--
|
|
<?php
|
|
|
|
$inner = 'x:i:1;O:8:"stdClass":0:{};m:a:0:{}';
|
|
$inner_len = strlen($inner);
|
|
$str = <<<STR
|
|
a:2:{i:0;C:16:"SPlObjectStorage":{$inner_len}:{{$inner}}i:1;R:4;}
|
|
STR;
|
|
var_dump(unserialize($str));
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[0]=>
|
|
object(SplObjectStorage)#1 (1) {
|
|
["storage":"SplObjectStorage":private]=>
|
|
array(1) {
|
|
[0]=>
|
|
array(2) {
|
|
["obj"]=>
|
|
object(stdClass)#2 (0) {
|
|
}
|
|
["inf"]=>
|
|
NULL
|
|
}
|
|
}
|
|
}
|
|
[1]=>
|
|
object(stdClass)#2 (0) {
|
|
}
|
|
}
|