xref: /PHP-8.1/ext/ffi/tests/029.phpt (revision bd9f4fa6)
1--TEST--
2FFI 029: _Alignas
3--EXTENSIONS--
4ffi
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