mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
20 lines
310 B
PHP
20 lines
310 B
PHP
--TEST--
|
|
FFI 014: Size of nested types
|
|
--EXTENSIONS--
|
|
ffi
|
|
--INI--
|
|
ffi.enable=1
|
|
--FILE--
|
|
<?php
|
|
$ffi = FFI::cdef();
|
|
|
|
var_dump(FFI::sizeof($ffi->new("uint32_t[2]")));
|
|
var_dump(FFI::sizeof($ffi->new("uint32_t([2])")));
|
|
var_dump(FFI::sizeof($ffi->new("uint32_t([2])[2]")));
|
|
?>
|
|
ok
|
|
--EXPECT--
|
|
int(8)
|
|
int(8)
|
|
int(16)
|
|
ok
|