Download src/php/php-src/ext/ffi/tests/023.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ffi/tests/023.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/ffi/tests/023.phpt
-
curl -L -o 023.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/ffi/tests/023.phpt
491 Bytes
| --TEST-- | |
| FFI 023: GCC struct extensions | |
| --EXTENSIONS-- | |
| ffi | |
| --INI-- | |
| ffi.enable=1 | |
| --FILE-- | |
| $ffi = FFI::cdef(); | |
| try { | |
| var_dump(FFI::sizeof($ffi->new("struct {}"))); | |
| } catch (Throwable $e) { | |
| echo get_class($e) . ": " . $e->getMessage() . "\n"; | |
| } | |
| var_dump(FFI::sizeof($ffi->new("struct {int a}"))); | |
| var_dump(FFI::sizeof($ffi->new("struct {int a; int b}"))); | |
| ok | |
| --EXPECT-- | |
| FFI\Exception: Cannot instantiate FFI\CData of zero size | |
| int(4) | |
| int(8) | |
| ok | |