summaryrefslogtreecommitdiffstats
path: root/zstd.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-10-23 09:03:08 +0200
committerRemi Collet <remi@remirepo.net>2019-10-23 09:03:08 +0200
commit175e158863e621bc269e64cd739b4d8462354eab (patch)
treea74ac0e73ad3190f5dbdb9a99142c0ee3e5b2d35 /zstd.php
parent8216eb1b5a4a80e804e56185d5c433443943a929 (diff)
FFI::load() doesn't work in conjunction with "opcache.preload_user". Use "ffi.preload" instead.
Diffstat (limited to 'zstd.php')
-rw-r--r--zstd.php6
1 files changed, 3 insertions, 3 deletions
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']);