1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/ffi/tests/011.phpt
T
2019-01-14 11:47:50 +03:00

21 lines
298 B
PHP

--TEST--
FFI 011: cast()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
ffi.enable=1
--FILE--
<?php
$a = FFI::new("uint8_t[4]");
$a[0] = 255;
$a[1] = 255;
var_dump(FFI::cast("uint16_t[2]", $a));
?>
--EXPECTF--
object(FFI\CData:uint16_t[2])#%d (2) {
[0]=>
int(65535)
[1]=>
int(0)
}