Handle trait use conflict resolution
[hiphop-php.git] / hphp / hack / hhi / builtins_fb.hhi
blob35236b8ad3b27e3de4e21afe3430f388c4f02979
1 <?hh   /* -*- php -*- */
3 namespace {
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);
37 <<__PHPStdLib>>
38 function fb_unserialize($thing, inout $success, int $options = 0);
39 <<__PHPStdLib, __Pure>>
40 function fb_compact_serialize($thing);
41 <<__PHPStdLib>>
42 function fb_compact_unserialize($thing, inout $success, inout $errcode);
43 <<__PHPStdLib>>
44 function fb_intercept(string $name, $handler, $data = null);
45 <<__PHPStdLib>>
46 function fb_intercept2(string $name, $handler);
47 <<__PHPStdLib>>
48 function fb_rename_function(string $orig_func_name, string $new_func_name);
49 <<__PHPStdLib>>
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);
55 <<__PHPStdLib>>
56 function fb_get_code_coverage(bool $flush);
57 <<__PHPStdLib>>
58 function fb_enable_code_coverage();
59 <<__PHPStdLib>>
60 function fb_disable_code_coverage();
61 <<__PHPStdLib>>
62 function xhprof_enable(int $flags = 0, $args = null);
63 <<__PHPStdLib>>
64 function xhprof_disable();
65 <<__PHPStdLib>>
66 function xhprof_network_enable();
67 <<__PHPStdLib>>
68 function xhprof_network_disable();
69 <<__PHPStdLib>>
70 function xhprof_frame_begin(string $name);
71 <<__PHPStdLib>>
72 function xhprof_frame_end();
73 <<__PHPStdLib>>
74 function xhprof_run_trace($packedTrace, $flags);
75 <<__PHPStdLib>>
76 function xhprof_sample_enable();
77 <<__PHPStdLib>>
78 function xhprof_sample_disable();
79 <<__PHPStdLib>>
80 function fb_output_compression(bool $new_value);
81 <<__PHPStdLib>>
82 function fb_set_exit_callback($function);
83 <<__PHPStdLib>>
84 function fb_get_last_flush_size();
85 <<__PHPStdLib>>
86 function fb_setprofile($callback, int $flags = SETPROFILE_FLAGS_DEFAULT, vec<string> $functions = vec[]);
87 } // namespace
89 namespace HH {
90 <<__PHPStdLib>>
91 function disable_code_coverage_with_frequency();
92 <<__PHPStdLib>>
93 function non_crypto_md5_upper(string $str): int;
94 <<__PHPStdLib>>
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).
101  */
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.
108  */
109 function int_mul_add_overflow(int $a, int $b, int $bias): int;
110 } // HH namespace