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