mirror of
https://github.com/php/php-src.git
synced 2026-04-20 06:21:12 +02:00
For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
26 lines
341 B
PHP
26 lines
341 B
PHP
--TEST--
|
|
FFI 030: bool type
|
|
--EXTENSIONS--
|
|
ffi
|
|
--INI--
|
|
ffi.enable=1
|
|
--FILE--
|
|
<?php
|
|
var_dump(FFI::sizeof(FFI::new("bool[2]")));
|
|
$p = FFI::new("bool[2]");
|
|
var_dump($p);
|
|
$p[1] = true;
|
|
var_dump($p[0]);
|
|
var_dump($p[1]);
|
|
?>
|
|
--EXPECTF--
|
|
int(2)
|
|
object(FFI\CData:bool[2])#%d (2) {
|
|
[0]=>
|
|
bool(false)
|
|
[1]=>
|
|
bool(false)
|
|
}
|
|
bool(false)
|
|
bool(true)
|