array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'ffi.sizeof.php', 1 => 'FFI::sizeof', 2 => 'Gets the size of C data or types', ), 'up' => array ( 0 => 'class.ffi.php', 1 => 'FFI', ), 'prev' => array ( 0 => 'ffi.scope.php', 1 => 'FFI::scope', ), 'next' => array ( 0 => 'ffi.string.php', 1 => 'FFI::string', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ffi/ffi/sizeof.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

FFI::sizeof

(PHP 7 >= 7.4.0, PHP 8)

FFI::sizeofGets the size of C data or types

说明

public static FFI::sizeof(FFI\CData|FFI\CType &$ptr): int

Returns the size of the given FFI\CData or FFI\CType object.

参数

ptr

The handle of the C data or type.

返回值

The size of the memory area pointed at by ptr.