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