mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
This works similar to `dlsym(RTLD_DEFAULT, …)` with the caveat that symbols on Windows may not be unique, and are usually qualified by the module they are exported from. That means that wrong symbols may be fetched, potentially causing serious issues; therefore this usage is not recommended for production purposes, but is a nice simplification for quick experiments and the ext/ffi test suite. Closes GH-16351.
14 lines
206 B
PHP
14 lines
206 B
PHP
--TEST--
|
|
FFI 301: FFI loading
|
|
--EXTENSIONS--
|
|
ffi
|
|
--INI--
|
|
ffi.enable=1
|
|
--FILE--
|
|
<?php
|
|
$ffi = FFI::load(__DIR__ . "/300.h");
|
|
$ffi->printf("Hello World from %s!\n", "PHP");
|
|
?>
|
|
--EXPECT--
|
|
Hello World from PHP!
|