--TEST-- Bug #77632 (FFI Segfaults When Called With Variadics) --SKIPIF-- --INI-- ffi.enable=1 --FILE-- time(); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage() . "\n"; } try { $ffi->time(null, null); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage() . "\n"; } try { $ffi->fprintf($ffi->stdout); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage() . "\n"; } try { $ffi->fprintf($ffi->stdout, 123, "Hello %s\n", "World"); } catch (Throwable $e) { echo get_class($e) . ": " . $e->getMessage() . "\n"; } ?> --EXPECT-- FFI\Exception: Incorrect number of arguments for C function 'time', expecting exactly 1 parameter FFI\Exception: Incorrect number of arguments for C function 'time', expecting exactly 1 parameter FFI\Exception: Incorrect number of arguments for C function 'fprintf', expecting at least 2 parameters FFI\Exception: Passing incompatible argument 2 of C function 'fprintf', expecting 'char*', found PHP 'int'