xref: /php-src/ext/ffi/tests/cdef_new.phpt (revision 11d6bea9)
1--TEST--
2Definitions should not leak when using FFI::cdef()->new(...)
3--EXTENSIONS--
4ffi
5--FILE--
6<?php
7$struct = \FFI::cdef()->new('struct Example { uint32_t x; }');
8var_dump($struct);
9?>
10--EXPECT--
11object(FFI\CData:struct Example)#2 (1) {
12  ["x"]=>
13  int(0)
14}
15