xref: /PHP-8.3/ext/ffi/tests/300.phpt (revision 75970077)
1--TEST--
2FFI 300: FFI preloading
3--EXTENSIONS--
4ffi
5opcache
6posix
7--SKIPIF--
8<?php
9if (substr(PHP_OS, 0, 3) == 'WIN') die('skip not for Windows');
10if (posix_geteuid() == 0) die('skip Cannot run test as root.');
11?>
12--INI--
13ffi.enable=1
14opcache.enable=1
15opcache.enable_cli=1
16opcache.optimization_level=-1
17opcache.preload={PWD}/preload.inc
18opcache.file_cache_only=0
19--FILE--
20<?php
21$ffi = FFI::scope("TEST_300");
22$ffi->printf("Hello World from %s!\n", "PHP");
23?>
24--EXPECT--
25Hello World from PHP!
26