Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<FFI::stringFFI::typeof>
^FFILast updated: Mon, 26 Oct 2026

FFI::type

(PHP 7 >= 7.4.0, PHP 8)

FFI::type — Creates an FFI\CType object from a C declaration

Description

public function FFI::type(string $type): ?FFI\CType

This function creates and returns a FFI\CType object for the given string containing a C type declaration. Any type declared for the instance is allowed.

Parameters

type

A valid C declaration as string.

Return Values

Returns the freshly created FFI\CType object, or null on failure.

Changelog

Version Description
8.3.0 Calling FFI::type() statically is now deprecated.

<FFI::stringFFI::typeof>
^FFILast updated: Mon, 26 Oct 2026