xref: /php-src/ext/ffi/tests/bug77632.phpt (revision bd9f4fa6)
1--TEST--
2Bug #77632 (FFI Segfaults When Called With Variadics)
3--EXTENSIONS--
4ffi
5--SKIPIF--
6<?php
7try {
8    $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
9} catch (Throwable $_) {
10    die('skip libc.so.6 not available');
11}
12?>
13--INI--
14ffi.enable=1
15--FILE--
16<?php
17$libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
18$args = ["test\n"];
19$libc->printf(...$args);
20?>
21--EXPECT--
22test
23