4 const FB_UNSERIALIZE_NONSTRING_VALUE = 0;
5 const FB_UNSERIALIZE_UNEXPECTED_END = 0;
6 const FB_UNSERIALIZE_UNRECOGNIZED_OBJECT_TYPE = 0;
7 const FB_UNSERIALIZE_UNEXPECTED_ARRAY_KEY_TYPE = 0;
8 const FB_UNSERIALIZE_MAX_DEPTH_EXCEEDED = 0;
10 const FB_SERIALIZE_HACK_ARRAYS = 0;
11 const FB_SERIALIZE_HACK_ARRAYS_AND_KEYSETS = 0;
12 const FB_SERIALIZE_VARRAY_DARRAY = 0;
14 const XHPROF_FLAGS_NO_BUILTINS = 0;
15 const XHPROF_FLAGS_CPU = 0;
16 const XHPROF_FLAGS_MEMORY = 0;
17 const XHPROF_FLAGS_VTSC = 0;
18 const XHPROF_FLAGS_TRACE = 0;
19 const XHPROF_FLAGS_MEASURE_XHPROF_DISABLE = 0;
20 const XHPROF_FLAGS_MALLOC = 0;
21 const XHPROF_FLAGS_I_HAVE_INFINITE_MEMORY = 0;
23 const SETPROFILE_FLAGS_ENTERS = 1;
24 const SETPROFILE_FLAGS_EXITS = 2;
25 const SETPROFILE_FLAGS_DEFAULT = 3;
26 const SETPROFILE_FLAGS_FRAME_PTRS = 4;
27 const SETPROFILE_FLAGS_CTORS = 8;
28 const SETPROFILE_FLAGS_RESUME_AWARE = 16;
29 /* This flag enables access to $this upon instance method entry in the
30 * setprofile handler. It *may break* in the future. */
31 const SETPROFILE_FLAGS_THIS_OBJECT__MAY_BREAK = 32;
33 const int PREG_FB__PRIVATE__HSL_IMPL = (1 << 29);
35 <<__PHPStdLib, __Pure>>
36 function fb_serialize($thing, int $options = 0);
38 function fb_unserialize($thing, inout $success, int $options = 0);
39 <<__PHPStdLib, __Pure>>
40 function fb_compact_serialize($thing);
42 function fb_compact_unserialize($thing, inout $success, inout $errcode);
44 function fb_intercept(string $name, $handler, $data = null);
46 function fb_intercept2(string $name, $handler);
48 function fb_rename_function(string $orig_func_name, string $new_func_name);
50 function fb_utf8ize(inout $input);
51 <<__PHPStdLib, __Pure>>
52 function fb_utf8_strlen(string $input);
53 <<__PHPStdLib, __Pure>>
54 function fb_utf8_substr(string $str, int $start, int $length = PHP_INT_MAX);
56 function fb_get_code_coverage(bool $flush);
58 function fb_enable_code_coverage();
60 function fb_disable_code_coverage();
62 function xhprof_enable(int $flags = 0, $args = null);
64 function xhprof_disable();
66 function xhprof_network_enable();
68 function xhprof_network_disable();
70 function xhprof_frame_begin(string $name);
72 function xhprof_frame_end();
74 function xhprof_run_trace($packedTrace, $flags);
76 function xhprof_sample_enable();
78 function xhprof_sample_disable();
80 function fb_output_compression(bool $new_value);
82 function fb_set_exit_callback($function);
84 function fb_get_last_flush_size();
86 function fb_setprofile($callback, int $flags = SETPROFILE_FLAGS_DEFAULT, vec<string> $functions = vec[]);
91 function disable_code_coverage_with_frequency();
93 function non_crypto_md5_upper(string $str): int;
95 function non_crypto_md5_lower(string $str): int;
97 /** Returns the overflow part of multiplying two ints, as if they were unsigned.
98 * In other words, this returns the upper 64 bits of the full product of
99 * (unsigned)$a and (unsigned)$b. (The lower 64 bits is just `$a * $b`
100 * regardless of signed/unsigned).
102 function int_mul_overflow(int $a, int $b): int;
104 /** Returns the overflow part of multiplying two ints plus another int, as if
105 * they were all unsigned. Specifically, this returns the upper 64 bits of
106 * full (unsigned)$a * (unsigned)$b + (unsigned)$bias. $bias can be used to
107 * manipulate rounding of the result.
109 function int_mul_add_overflow(int $a, int $b, int $bias): int;