Files
archived-pecl-php-ffi/ffi.php
Wez Furlong edbb91f4f6 Add ffi (Foreign Function Interface) extension that allows calling of functions
from DLLs and DSO's (Unix).
Tested under win32 only for now, but should compile under Unices also.
2004-01-09 22:30:20 +00:00

20 lines
447 B
PHP

<?
if(!extension_loaded('ffi')) {
dl('ffi.' . PHP_SHLIB_SUFFIX);
}
$module = 'ffi';
$functions = get_extension_funcs($module);
echo "Functions available in the test extension:<br>\n";
foreach($functions as $func) {
echo $func."<br>\n";
}
echo "<br>\n";
$function = 'confirm_' . $module . '_compiled';
if (extension_loaded($module)) {
$str = $function($module);
} else {
$str = "Module $module is not compiled into PHP";
}
echo "$str\n";
?>