--TEST-- FFI 003: Forward tag/typedef declarations --SKIPIF-- --INI-- ffi.enable=1 --FILE-- new("struct _a")); var_dump($ffi->new("struct _b")); var_dump($ffi->new("c")); var_dump($ffi->new("d")); try { var_dump($ffi->new("struct _e")); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage()."\n"; } try { var_dump($ffi->new("f")); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage()."\n"; } echo "ok\n"; ?> --EXPECTF-- object(FFI\CData:struct _a)#%d (1) { ["x"]=> int(0) } object(FFI\CData:struct _b)#%d (1) { ["x"]=> int(0) } object(FFI\CData:struct _c)#%d (1) { ["x"]=> int(0) } object(FFI\CData:struct _d)#%d (1) { ["x"]=> int(0) } FFI\ParserException: Incomplete struct "_e" at line 1 FFI\ParserException: Incomplete struct "_f" at line 1 ok