File tree 3 files changed +9
-8
lines changed
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 6
6
ffi.enable=1
7
7
--FILE--
8
8
<?php
9
- $ cdata_value = \FFI ::new ('int ' );
10
- $ cdata_array = \FFI ::new ('int[1] ' );
11
- $ cdata_free = \FFI ::new ('int[1] ' , false );
9
+ $ cdef = \FFI ::cdef ();
10
+ $ cdata_value = $ cdef ->new ('int ' );
11
+ $ cdata_array = $ cdef ->new ('int[1] ' );
12
+ $ cdata_free = $ cdef ->new ('int[1] ' , false );
12
13
\FFI ::free ($ cdata_free );
13
14
14
15
$ ref_value = \WeakReference::create ($ cdata_value );
Original file line number Diff line number Diff line change 6
6
ffi.enable=1
7
7
--FILE--
8
8
<?php
9
- $ ctype = \FFI ::type ('int ' );
9
+ $ ctype = \FFI ::cdef ()-> type ('int ' );
10
10
$ ref = \WeakReference::create ($ ctype );
11
11
var_dump ($ ref ->get () === $ ctype );
12
12
unset($ ctype );
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ ffi.enable=1
9
9
$ map = new WeakMap ();
10
10
11
11
$ ffi = \FFI ::cdef ('' );
12
- $ cdata_value = \ FFI :: new ('int ' );
13
- $ cdata_array = \ FFI :: new ('int[1] ' );
14
- $ cdata_free = \ FFI :: new ('int[1] ' , false );
12
+ $ cdata_value = $ ffi -> new ('int ' );
13
+ $ cdata_array = $ ffi -> new ('int[1] ' );
14
+ $ cdata_free = $ ffi -> new ('int[1] ' , false );
15
15
\FFI ::free ($ cdata_free );
16
- $ ctype = \ FFI :: type ('int ' );
16
+ $ ctype = $ ffi -> type ('int ' );
17
17
18
18
$ map [$ ffi ] = 'ffi ' ;
19
19
$ map [$ cdata_value ] = 'cdata_value ' ;
You can’t perform that action at this time.
0 commit comments