xref: /php-src/ext/ffi/tests/bug79749.phpt (revision 4acf0084)
1--TEST--
2Bug #79749 (Converting FFI instances to bool fails)
3--EXTENSIONS--
4ffi
5--FILE--
6<?php
7$ffi = FFI::cdef('typedef int dummy;');
8var_dump((bool) $ffi);
9var_dump((bool) FFI::cdef()->type('int'));
10var_dump((bool) FFI::cdef()->new('int'));
11?>
12--EXPECT--
13bool(true)
14bool(true)
15bool(true)
16