1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Files
archived-php-src/ext/ffi/tests/weak_reference_001.phpt
2023-10-28 14:59:06 +02:00

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)