mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
04b35a44ce
Thank you!
18 lines
261 B
PHP
18 lines
261 B
PHP
--TEST--
|
|
Weak reference to \FFI
|
|
--EXTENSIONS--
|
|
ffi
|
|
--INI--
|
|
ffi.enable=1
|
|
--FILE--
|
|
<?php
|
|
$ffi = \FFI::cdef('');
|
|
$ref = \WeakReference::create($ffi);
|
|
var_dump($ref->get() === $ffi);
|
|
unset($ffi);
|
|
var_dump($ref->get() === null);
|
|
?>
|
|
--EXPECTF--
|
|
bool(true)
|
|
bool(true)
|