From 175e158863e621bc269e64cd739b4d8462354eab Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 23 Oct 2019 09:03:08 +0200 Subject: FFI::load() doesn't work in conjunction with "opcache.preload_user". Use "ffi.preload" instead. --- zstd.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zstd.php') diff --git a/zstd.php b/zstd.php index 35c8876..7faebea 100644 --- a/zstd.php +++ b/zstd.php @@ -14,16 +14,16 @@ if (PHP_VERSION_ID < 70400 || !extension_loaded("ffi")) { printf("PHP version %s\n", PHP_VERSION); if (PHP_SAPI == "cli" && !class_exists("\\Remi\\Zstd")) { - printf("Fallback on manual load\n\n"); + printf("Fallback on manual load\n"); require_once __DIR__ . '/preload-zstd.inc'; } else { - printf("Use preloaded class\n\n"); + printf("Use preloaded class\n"); } if (class_exists("\\Remi\\Zstd")) { $t = microtime(true); $ret = \Remi\Zstd::compress(PHP_BINARY, "testffi.zstd"); - printf("Src length = %d\n", $ret['in_len']); + printf("\nSrc length = %d\n", $ret['in_len']); printf("ZSTD_compressBound = %d\n", $ret['max_len']); printf("ZSTD_compress = %d\n", $ret['out_len']); -- cgit