Download src/php/php-src/ext/ffi/tests/011.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 292 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ffi/tests/011.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ffi/tests/011.phpt
-
curl -L -o 011.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ffi/tests/011.phpt
292 Bytes
| --TEST-- | |
| FFI 011: cast() | |
| --EXTENSIONS-- | |
| ffi | |
| --INI-- | |
| ffi.enable=1 | |
| --FILE-- | |
| $ffi = FFI::cdef(); | |
| $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) | |
| } | |