php-src/ext/ffi/tests/bug78543.phpt
Christoph M. Becker 9dfbcd7248 Fix #78543: is_callable() on FFI\CData throws Exception
If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the
exeception pass to userland, if called through `is_callable()`.
2019-09-19 09:13:22 +02:00

13 lines
270 B
PHP

--TEST--
Bug #78543 (is_callable() on FFI\CData throws Exception)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$ffi = FFI::cdef(' struct test { int dummy; }; ');
$test = $ffi->new('struct test');
var_dump(is_callable($test));
?>
--EXPECT--
bool(false)