mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
27 lines
351 B
PHP
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
|
|
}
|