1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 12:42:29 +02:00
Files
archived-php-src/ext/ffi/tests/preload.inc
2019-01-14 11:47:50 +03:00

15 lines
378 B
PHP

<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
$fn = __DIR__ . "/300-win32.h";
$cont = str_replace(
"PHP_DLL_NAME",
"php" . PHP_MAJOR_VERSION . (PHP_ZTS ? "ts" : "") . (PHP_DEBUG ? "_debug" : "") . ".dll",
file_get_contents("$fn.in")
);
file_put_contents($fn, $cont);
$ffi = FFI::load($fn);
/* Test should cleanup this. */
} else {
FFI::load(__DIR__ . "/300.h");
}