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