xref: /PHP-8.0/ext/ffi/tests/029.phpt (revision f8d79582)
1--TEST--
2FFI 029: _Alignas
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--INI--
6ffi.enable=1
7--FILE--
8<?php
9$ffi = FFI::cdef("
10    typedef char t1;
11    typedef char _Alignas(int) t2;
12");
13var_dump(FFI::sizeof($ffi->new("struct {char a; t1 b;}")));
14var_dump(FFI::sizeof($ffi->new("struct {char a; t2 b;}")));
15?>
16--EXPECT--
17int(2)
18int(8)
19