1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/weakrefs/weakrefs_debug_dump.phpt
Niels Dossche d6d3370034 Implement GH-13609: Dump wrapped object in WeakReference class (#13621)
I chose "object" as that's also the argument name in WeakReference::create.
2024-03-08 18:31:24 +01:00

27 lines
351 B
PHP

--TEST--
Weakrefs debug dump
--FILE--
<?php
$s = new stdClass;
$s->hello = 'world';
$weak = WeakReference::create($s);
var_dump($weak);
unset($s);
var_dump($weak);
?>
--EXPECT--
object(WeakReference)#2 (1) {
["object"]=>
object(stdClass)#1 (1) {
["hello"]=>
string(5) "world"
}
}
object(WeakReference)#2 (1) {
["object"]=>
NULL
}