1--TEST--
2Weak reference to \FFI\CType
3--EXTENSIONS--
4ffi
5--INI--
6ffi.enable=1
7--FILE--
8<?php
9$ctype = \FFI::cdef()->type('int');
10$ref = \WeakReference::create($ctype);
11var_dump($ref->get() === $ctype);
12unset($ctype);
13var_dump($ref->get() === null);
14?>
15--EXPECTF--
16bool(true)
17bool(true)
18