dis-bench / src /php /php-src /ext /ffi /tests /029.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
309 Bytes
--TEST--
FFI 029: _Alignas
--EXTENSIONS--
ffi
--INI--
ffi.enable=1
--FILE--
<?php
$ffi = FFI::cdef("
typedef char t1;
typedef char _Alignas(int) t2;
");
var_dump(FFI::sizeof($ffi->new("struct {char a; t1 b;}")));
var_dump(FFI::sizeof($ffi->new("struct {char a; t2 b;}")));
?>
--EXPECT--
int(2)
int(8)