1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Files
archived-php-src/ext/ffi/tests/ffi_load_error.phpt
T
Thomas PIRAS 289822d3ad Add a proper error message for ffi load
We call dlerror when a library failed to load properly.

Closes GH-9913.
2022-11-28 16:19:54 +01:00

17 lines
303 B
PHP

--TEST--
Test that FFI::load returns a detailed error when failling to load a shared library
--EXTENSIONS--
ffi
--INI--
ffi.enable=1
--FILE--
<?php
try {
FFI::load(__DIR__ . "/ffi_load_error.h");
} catch (FFI\Exception $ex) {
printf($ex->getMessage());
}
?>
--EXPECTF--
Failed loading '%s' (%s)