Home
last modified time | relevance | path

Searched refs:ffi (Results 1 – 25 of 114) sorted by relevance

12345

/PHP-8.2/ext/ffi/tests/
H A Dgh14286_1.phpt2 GH-14286 (ffi enum type (when enum has no name) make memory leak)
4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
33 var_dump($ffi->TEST_ONE);
34 var_dump($ffi->TEST_TWO);
35 var_dump($ffi->TEST_THREE);
36 var_dump($ffi->TEST_FOUR);
37 var_dump($ffi->TEST_FIVE);
38 var_dump($ffi->TEST_SIX);
H A D044.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
21 var_dump(FFI::sizeof($ffi->new("a")));
22 var_dump(FFI::sizeof($ffi->new("ua")));
23 var_dump(FFI::sizeof($ffi->new("b")));
24 var_dump(FFI::sizeof($ffi->new("ub")));
25 var_dump(FFI::sizeof($ffi->new("c")));
27 var_dump(FFI::sizeof($ffi->new("d")));
29 var_dump(FFI::sizeof($ffi->new("e")));
[all …]
H A Dweak_reference_001.phpt4 ffi
6 ffi.enable=1
9 $ffi = \FFI::cdef('');
10 $ref = \WeakReference::create($ffi);
11 var_dump($ref->get() === $ffi);
12 unset($ffi);
H A D004.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef(<<<EOF
35 var_dump($ffi->new("enum _a"));
36 var_dump($ffi->new("enum _b"));
37 var_dump($ffi->new("c"));
38 var_dump($ffi->new("d"));
39 var_dump($ffi->new("int[_c2]"));
40 var_dump($ffi->new("int[_c3]"));
41 var_dump($ffi->new("int[_c4]"));
[all …]
H A Dgh8433.phpt4 ffi
6 ffi.enable=1
10 $ffi = FFI::cdef("typedef struct { int a; } bar;");
11 $x = $ffi->new("bar(*)(void)");
12 FFI::addr($x)[0] = function() use ($ffi) {
13 $bar = $ffi->new("bar");
H A Dtrampoline_reset.phpt4 ffi
14 ffi.enable=1
31 $ffi = FFI::cdef($header, 'libc.so.6');
35 $ffi->fprintf($ffi->stdout, "FFI\n");
36 $ffi->fflush($ffi->stdout);
H A D302.phpt4 ffi
8 ffi.enable=1
9 ffi.preload={PWD}/300.h
12 $ffi = FFI::scope("TEST_300");
13 $ffi->printf("Hello World from %s!\n", "PHP");
H A D003.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef(<<<EOF
28 var_dump($ffi->new("struct _a"));
29 var_dump($ffi->new("struct _b"));
30 var_dump($ffi->new("c"));
31 var_dump($ffi->new("d"));
33 var_dump($ffi->new("struct _e"));
38 var_dump($ffi->new("f"));
H A D029.phpt4 ffi
6 ffi.enable=1
9 $ffi = FFI::cdef("
13 var_dump(FFI::sizeof($ffi->new("struct {char a; t1 b;}")));
14 var_dump(FFI::sizeof($ffi->new("struct {char a; t2 b;}")));
H A D303.phpt4 ffi
8 ffi.enable=1
9 ffi.preload={PWD}/300*.h
12 $ffi = FFI::scope("TEST_300");
13 $ffi->printf("Hello World from %s!\n", "PHP");
H A Dweak_reference_004.phpt4 ffi
6 ffi.enable=1
11 $ffi = \FFI::cdef('');
18 $map[$ffi] = 'ffi';
26 unset($ffi);
H A Dgh14626.phpt4 ffi
10 ffi.enable=1
17 $ffi = FFI::cdef(<<<C
21 $ptr = $ffi->malloc(10);
22 $addr = $ffi->cast("uintptr_t", $ffi->cast("char*", $ptr))->cdata;
H A Dbug80186.phpt4 ffi
7 $ffi = FFI::cdef('typedef int dummy;');
8 foreach ($ffi as $_) { }
9 foreach ($ffi as &$_) { }
H A Dbug77706.phpt4 ffi
14 ffi.enable=1
31 $ffi = FFI::cdef($header, 'libc.so.6');
34 $ffi->time();
40 $ffi->time(null, null);
46 $ffi->fprintf($ffi->stdout);
52 $ffi->fprintf($ffi->stdout, 123, "Hello %s\n", "World");
H A Dbug79096.phpt4 ffi
19 $ffi = FFI::cdef($header);
22 $ffi = FFI::cdef($header, 'php_zend_test.dll');
24 $ffi = FFI::cdef($header, ffi_get_php_dll_name());
28 $struct = $ffi->bug79096();
H A Dbug79532.phpt4 ffi
15 $ffi = FFI::cdef($header);
18 $ffi = FFI::cdef($header, 'php_zend_test.dll');
20 $ffi = FFI::cdef($header, ffi_get_php_dll_name());
25 $ffi->bug79532($array, 3);
H A Dbug78714.phpt4 ffi
6 ffi.enable=1
11 $ffi = ffi_cdef($def, ffi_get_php_dll_name());
12 echo substr(FFI::string($ffi->get_zend_version()), 0, 4) . "\n";
H A D301.phpt4 ffi
8 ffi.enable=1
11 $ffi = FFI::load(__DIR__ . "/300.h");
12 $ffi->printf("Hello World from %s!\n", "PHP");
H A Dbug79177.phpt4 ffi
15 $ffi = FFI::cdef($header);
18 $ffi = FFI::cdef($header, 'php_zend_test.dll');
20 $ffi = FFI::cdef($header, ffi_get_php_dll_name());
24 $ffi->bug79177_cb = function() {
28 $ffi->bug79177(); // this is supposed to raise a fatal error
H A Dgh14215.phpt4 ffi
13 ffi.enable=1
18 $ffi = FFI::load($header_path);
19 var_dump($ffi->GetLastError());
H A Dbug_gh9090.phpt4 ffi
23 $ffi = FFI::cdef($h);
26 $ffi = FFI::cdef($h, 'php_zend_test.dll');
28 $ffi = FFI::cdef($h, ffi_get_php_dll_name());
52 $ffi->$func_ptr = $ffi->$func;
53 call_user_func_array($ffi->$func_ptr, $argv);
H A Dgh14286_2.phpt2 GH-14286 (ffi enum type (when enum has no name) make memory leak)
4 ffi
10 ffi.enable=1
14 $ffi = FFI::cdef("
H A D301-win32.phpt4 ffi
8 ffi.enable=1
20 $ffi = FFI::load($fn);
21 $ffi->php_printf("Hello World from %s!\n", "PHP");
/PHP-8.2/ext/ffi/
H A Dconfig.w321 ARG_WITH('ffi', 'ffi support', 'no');
4 if (CHECK_HEADER_ADD_INCLUDE("ffi.h", "CFLAGS_FFI", PHP_FFI+ ";" + PHP_PHP_BUILD + "\\include") &&
5 CHECK_LIB("libffi.lib", "ffi", PHP_FFI)) {
6 AC_DEFINE('HAVE_FFI', 1, 'ffi support enabled');
19 EXTENSION('ffi', 'ffi.c ffi_parser.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
21 WARNING('ffi not enabled, headers or libraries not found');
H A Dconfig.m41 PHP_ARG_WITH([ffi],
3 [AS_HELP_STRING([--with-ffi],
12 AC_DEFINE(HAVE_FFI, 1, [Have ffi support])
19 [AC_LANG_PROGRAM([[#include <ffi.h>]],
32 [AC_LANG_PROGRAM([[#include <ffi.h>]],
45 [AC_LANG_PROGRAM([[#include <ffi.h>]],
58 [AC_LANG_PROGRAM([[#include <ffi.h>]],
71 [AC_LANG_PROGRAM([[#include <ffi.h>]],
84 [AC_LANG_PROGRAM([[#include <ffi.h>]],
97 [AC_LANG_PROGRAM([[#include <ffi.h>]],
[all …]

Completed in 24 milliseconds

12345