mirror of
https://github.com/php/php-src.git
synced 2026-04-18 05:21:02 +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
32 lines
428 B
PHP
32 lines
428 B
PHP
--TEST--
|
|
FFI 005: Array assignment
|
|
--EXTENSIONS--
|
|
ffi
|
|
--INI--
|
|
ffi.enable=1
|
|
--FILE--
|
|
<?php
|
|
$m = FFI::new("int[2][2]");
|
|
$v = FFI::new("int[2]");
|
|
$v[1] = 42;
|
|
$m[1] = $v;
|
|
var_dump($m);
|
|
?>
|
|
--EXPECTF--
|
|
object(FFI\CData:int32_t[2][2])#%d (2) {
|
|
[0]=>
|
|
object(FFI\CData:int32_t[2])#%d (2) {
|
|
[0]=>
|
|
int(0)
|
|
[1]=>
|
|
int(0)
|
|
}
|
|
[1]=>
|
|
object(FFI\CData:int32_t[2])#%d (2) {
|
|
[0]=>
|
|
int(0)
|
|
[1]=>
|
|
int(42)
|
|
}
|
|
}
|