1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/ffi/tests/weak_reference_003.phpt
2023-10-28 16:28:43 +02:00

18 lines
286 B
PHP

--TEST--
Weak reference to \FFI\CType
--EXTENSIONS--
ffi
--INI--
ffi.enable=1
--FILE--
<?php
$ctype = \FFI::cdef()->type('int');
$ref = \WeakReference::create($ctype);
var_dump($ref->get() === $ctype);
unset($ctype);
var_dump($ref->get() === null);
?>
--EXPECTF--
bool(true)
bool(true)