From e7844b8bab879bda97185ccaa5d820ba8e689f87 Mon Sep 17 00:00:00 2001 From: David Snider Date: Fri, 20 Apr 2018 11:04:02 -0700 Subject: [PATCH] Mark a bunch of builtins as reactive Reviewed By: kmeht Differential Revision: D7694143 fbshipit-source-id: ddf2579a99274efe0530dc2e1809868d47e3fa3b --- hphp/hack/hhi/container_functions.hhi | 6 +- hphp/hack/hhi/functions.hhi | 24 +++--- hphp/hack/hhi/stdlib/builtins_array.hhi | 54 ++++++------- hphp/hack/hhi/stdlib/builtins_bzip2.hhi | 4 +- hphp/hack/hhi/stdlib/builtins_class.hhi | 2 +- hphp/hack/hhi/stdlib/builtins_file.hhi | 4 +- hphp/hack/hhi/stdlib/builtins_hash.hhi | 12 +-- hphp/hack/hhi/stdlib/builtins_lz4.hhi | 6 +- hphp/hack/hhi/stdlib/builtins_math.hhi | 86 ++++++++++----------- hphp/hack/hhi/stdlib/builtins_misc.hhi | 6 +- hphp/hack/hhi/stdlib/builtins_network.hhi | 8 +- hphp/hack/hhi/stdlib/builtins_options.hhi | 2 +- hphp/hack/hhi/stdlib/builtins_preg.hhi | 2 +- hphp/hack/hhi/stdlib/builtins_string.hhi | 120 ++++++++++++++--------------- hphp/hack/hhi/stdlib/builtins_url.hhi | 14 ++-- hphp/hack/hhi/stdlib/builtins_variable.hhi | 16 ++-- hphp/hack/hhi/stdlib/builtins_xml.hhi | 4 +- hphp/hack/hhi/stdlib/builtins_zlib.hhi | 18 ++--- 18 files changed, 195 insertions(+), 193 deletions(-) diff --git a/hphp/hack/hhi/container_functions.hhi b/hphp/hack/hhi/container_functions.hhi index cbe824f69dd..588a3c56130 100644 --- a/hphp/hack/hhi/container_functions.hhi +++ b/hphp/hack/hhi/container_functions.hhi @@ -14,12 +14,12 @@ * YOU SHOULD NEVER INCLUDE THIS FILE ANYWHERE!!! */ -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_key_exists(mixed $key, ?KeyedContainer $search): bool; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_sum/**/(/*Container*/ $input)/*: num*/; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_product/**/(/*Container*/ $input)/*: num*/; <<__PHPStdLib>> diff --git a/hphp/hack/hhi/functions.hhi b/hphp/hack/hhi/functions.hhi index c2e00a8bcba..16812b3faca 100644 --- a/hphp/hack/hhi/functions.hhi +++ b/hphp/hack/hhi/functions.hhi @@ -27,20 +27,20 @@ function unset($x): void; function freeze($x) : void; // -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_fill(int $start_index, int $num, T $value): array; // TODO make non-nullable once Thrift files are fixed -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function chr(int $ascii): string; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function count(mixed $x, int $mode = COUNT_NORMAL): int; // count takes Countable or array. We'll need to hardcode this... -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function dechex(int $number): string; <<__Rx>> function func_get_args(): array; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function implode(string $glue, $pieces): string; // could be Container -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function explode(string $delimiter, ?Stringish $str, int $limit = 0x7FFFFFFF): array; // : array & false for '' delimiter <<__Rx>> function is_array(mixed $arg): bool; @@ -50,20 +50,20 @@ function is_vec(mixed $arg): bool; function is_dict(mixed $arg): bool; <<__Rx>> function is_keyset(mixed $arg): bool; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function ord(string $string): int; <<__PHPStdLib>> function strip_tags(string $str, string $allowable_tags = ''): string; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function intval($v, $base = 10): int; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function doubleval($v): float; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function floatval($v): float; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strval($v): string; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function boolval($v): bool; <<__PHPStdLib>> diff --git a/hphp/hack/hhi/stdlib/builtins_array.hhi b/hphp/hack/hhi/stdlib/builtins_array.hhi index 223bf019bed..e8e8adb8a45 100644 --- a/hphp/hack/hhi/stdlib/builtins_array.hhi +++ b/hphp/hack/hhi/stdlib/builtins_array.hhi @@ -59,21 +59,21 @@ const int UCOL_NORMALIZATION_MODE = 0; const int UCOL_STRENGTH = 0; const int UCOL_HIRAGANA_QUATERNARY_MODE = 0; const int UCOL_NUMERIC_COLLATION = 0; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_change_key_case($input, $upper = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_chunk($input, $size, $preserve_keys = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_combine($keys, $values); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_count_values($input); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_column( array> $array, ?Tk $column_key, ?Tk $index_key = null, ): array; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_fill_keys($keys, $value); /* * Calls to array_filter are rewritten depending on the type @@ -89,11 +89,11 @@ function array_fill_keys($keys, $value); * */ function array_filter(Container $input, ?(function(Tv):bool) $callback = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_flip($trans); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function key_exists($key, $search); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_keys( KeyedContainer $input, ?Tv $search_value = null, @@ -123,14 +123,16 @@ function array_keys( * X (unknown type) -> R = Y (other unknown type) */ function array_map($callback, $arr1, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_merge_recursive($array1, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_merge($array1, ...); +<<__Rx>> function array_replace_recursive($array1, ...); +<<__Rx>> function array_replace($array1, ...); function array_multisort(&$arr1, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_pad($input, $pad_size, $pad_value); <<__PHPStdLib>> function array_pop(&$array); @@ -139,21 +141,21 @@ function array_push(&$array, $var, ...); <<__PHPStdLib>> function array_rand($input, $num_req = 1); function array_reduce($input, $callback, $initial = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_reverse($array, $preserve_keys = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_search($needle, $haystack, $strict = false); <<__PHPStdLib>> function array_shift(&$array); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_slice($array, $offset, $length = null, $preserve_keys = false); <<__PHPStdLib>> function array_splice(&$input, $offset, $length = null, $replacement = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_unique($array, $sort_flags = 2); <<__PHPStdLib>> function array_unshift(&$array, $var, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_values(Container $input): array; <<__PHPStdLib>> function array_walk_recursive(&$input, $funcname, $userdata = null); @@ -163,7 +165,7 @@ function compact($varname, ...); <<__PHPStdLib>> function shuffle(&$array); <<__Deprecated('Use count(), it does the same thing as sizeof() in PHP and '. - 'doesn\'t suggest that it\'s counting bytes.'), __PHPStdLib>> + 'doesn\'t suggest that it\'s counting bytes.'), __PHPStdLib, __Rx>> function sizeof($var, $recursive = false); <<__PHPStdLib>> function each(&$array); @@ -187,15 +189,15 @@ function key(&$array); function hphp_get_iterator($iterable); <<__PHPStdLib>> function hphp_get_mutable_iterator(&$iterable); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function in_array($needle, $haystack, $strict = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function range($low, $high, $step = 1); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_diff($array1, $array2, ...); <<__PHPStdLib>> function array_udiff($array1, $array2, $data_compare_func, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_diff_assoc($array1, $array2, ...); <<__PHPStdLib>> function array_diff_uassoc($array1, $array2, $key_compare_func, ...); @@ -203,15 +205,15 @@ function array_diff_uassoc($array1, $array2, $key_compare_func, ...); function array_udiff_assoc($array1, $array2, $data_compare_func, ...); <<__PHPStdLib>> function array_udiff_uassoc($array1, $array2, $data_compare_func, $key_compare_func, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_diff_key($array1, $array2, ...); <<__PHPStdLib>> function array_diff_ukey($array1, $array2, $key_compare_func, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_intersect($array1, $array2, ...); <<__PHPStdLib>> function array_uintersect($array1, $array2, $data_compare_func, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_intersect_assoc($array1, $array2, ...); <<__PHPStdLib>> function array_intersect_uassoc($array1, $array2, $key_compare_func, ...); @@ -219,7 +221,7 @@ function array_intersect_uassoc($array1, $array2, $key_compare_func, ...); function array_uintersect_assoc($array1, $array2, $data_compare_func, ...); <<__PHPStdLib>> function array_uintersect_uassoc($array1, $array2, $data_compare_func, $key_compare_func, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function array_intersect_key($array1, $array2, ...); <<__PHPStdLib>> function array_intersect_ukey($array1, $array2, $key_compare_func, ...); diff --git a/hphp/hack/hhi/stdlib/builtins_bzip2.hhi b/hphp/hack/hhi/stdlib/builtins_bzip2.hhi index aa19019d6a8..7b8d0b102f5 100644 --- a/hphp/hack/hhi/stdlib/builtins_bzip2.hhi +++ b/hphp/hack/hhi/stdlib/builtins_bzip2.hhi @@ -24,7 +24,7 @@ function bzerrstr($bz) { } function bzerror($bz) { } <<__PHPStdLib>> function bzerrno($bz) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function bzcompress($source, $blocksize = 4, $workfactor = 0) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function bzdecompress($source, $small = 0) { } diff --git a/hphp/hack/hhi/stdlib/builtins_class.hhi b/hphp/hack/hhi/stdlib/builtins_class.hhi index c015691feb2..e33a853c3f8 100644 --- a/hphp/hack/hhi/stdlib/builtins_class.hhi +++ b/hphp/hack/hhi/stdlib/builtins_class.hhi @@ -30,7 +30,7 @@ function get_class_vars(string $class_name); function get_class($object = null); <<__Rx>> function get_parent_class($object = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function is_a($class_or_object, string $class_name, bool $allow_string = false): bool; <<__PHPStdLib>> function is_subclass_of($class_or_object, string $class_name, bool $allow_string = true): bool; diff --git a/hphp/hack/hhi/stdlib/builtins_file.hhi b/hphp/hack/hhi/stdlib/builtins_file.hhi index 76001281e3d..20d0aa1ab23 100644 --- a/hphp/hack/hhi/stdlib/builtins_file.hhi +++ b/hphp/hack/hhi/stdlib/builtins_file.hhi @@ -143,7 +143,7 @@ function unlink($filename, $context = null); function link($target, $link); <<__PHPStdLib>> function symlink($target, $link); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function basename($path, $suffix = null); <<__PHPStdLib>> function fnmatch($pattern, $filename, $flags = 0); @@ -213,7 +213,7 @@ function disk_total_space($directory); function mkdir($pathname, $mode = 0777, $recursive = false, $context = null); <<__PHPStdLib>> function rmdir($dirname, $context = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function dirname($path); <<__PHPStdLib>> function getcwd(); diff --git a/hphp/hack/hhi/stdlib/builtins_hash.hhi b/hphp/hack/hhi/stdlib/builtins_hash.hhi index 72ad7be9a86..fbdf6ddea3a 100644 --- a/hphp/hack/hhi/stdlib/builtins_hash.hhi +++ b/hphp/hack/hhi/stdlib/builtins_hash.hhi @@ -8,9 +8,9 @@ * */ -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hash($algo, $data, $raw_output = false) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hash_algos() { } <<__PHPStdLib>> function hash_init($algo, $options = 0, $key = null) { } @@ -20,7 +20,7 @@ function hash_file($algo, $filename, $raw_output = false) { } function hash_final($context, $raw_output = false) { } <<__PHPStdLib>> function hash_hmac_file($algo, $filename, $key, $raw_output = false) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hash_hmac($algo, $data, $key, $raw_output = false) { } <<__PHPStdLib>> function hash_update_file($init_context, $filename, $stream_context = null) { } @@ -28,9 +28,9 @@ function hash_update_file($init_context, $filename, $stream_context = null) { } function hash_update_stream($context, $handle, $length = -1) { } <<__PHPStdLib>> function hash_update($context, $data) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function furchash_hphp_ext($key, $len, $nPart) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function furchash_hphp_ext_supported() { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hphp_murmurhash($key, $len, $seed) { } diff --git a/hphp/hack/hhi/stdlib/builtins_lz4.hhi b/hphp/hack/hhi/stdlib/builtins_lz4.hhi index 5cc79fd91c2..c938e1f0ca0 100644 --- a/hphp/hack/hhi/stdlib/builtins_lz4.hhi +++ b/hphp/hack/hhi/stdlib/builtins_lz4.hhi @@ -8,9 +8,9 @@ * */ -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function lz4_compress(string $uncompressed, bool $high = false): mixed; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function lz4_hccompress(string $uncompressed): mixed; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function lz4_uncompress(string $compressed): mixed; diff --git a/hphp/hack/hhi/stdlib/builtins_math.hhi b/hphp/hack/hhi/stdlib/builtins_math.hhi index 17aeba7e716..fef1cb0fd12 100644 --- a/hphp/hack/hhi/stdlib/builtins_math.hhi +++ b/hphp/hack/hhi/stdlib/builtins_math.hhi @@ -31,93 +31,93 @@ const M_SQRT1_2 = 0.0; const M_LNPI = 0.0; const M_EULER = 0.0; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function pi(); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function min($value, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function max($value, ...); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function abs($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function is_finite($val); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function is_infinite($val); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function is_nan(float $val): bool; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function ceil($value); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function floor($value): float; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function round($val, $precision = 0, $mode = 1); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function deg2rad($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function rad2deg($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function decbin($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function decoct($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function bindec($binary_string); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hexdec($hex_string); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function octdec($octal_string); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function base_convert($number, $frombase, $tobase); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function pow($base, $exp); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function exp($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function expm1($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function log10($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function log1p($number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function log($arg, $base = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function cos($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function cosh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function sin($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function sinh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function tan($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function tanh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function acos($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function acosh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function asin($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function asinh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function atan($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function atanh($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function atan2($y, $x); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hypot($x, $y); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function fmod($x, $y); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function sqrt($arg); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function getrandmax(); <<__PHPStdLib>> function srand($seed = null); <<__PHPStdLib>> function rand($min = 0, $max = -1 /* getrandmax */ ); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function mt_getrandmax(); <<__PHPStdLib>> function mt_srand($seed = null); @@ -125,5 +125,5 @@ function mt_srand($seed = null); function mt_rand($min = 0, $max = -1 /* mt_getrandmax */ ); <<__PHPStdLib>> function lcg_value(); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function intdiv(int $numerator, int $denominator): int; diff --git a/hphp/hack/hhi/stdlib/builtins_misc.hhi b/hphp/hack/hhi/stdlib/builtins_misc.hhi index f434b6e42de..47c0e296a0a 100644 --- a/hphp/hack/hhi/stdlib/builtins_misc.hhi +++ b/hphp/hack/hhi/stdlib/builtins_misc.hhi @@ -36,7 +36,7 @@ function show_source($filename, $ret = false); function highlight_string($str, $ret = false); <<__PHPStdLib>> function ignore_user_abort($setting = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function pack($format, ...); <<__PHPStdLib>> function php_check_syntax($filename, &$error_message = null); @@ -52,11 +52,11 @@ function time_nanosleep($seconds, $nanoseconds); function time_sleep_until($timestamp); <<__PHPStdLib>> function uniqid($prefix = null, $more_entropy = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function unpack($format, $data); <<__PHPStdLib>> function sys_getloadavg(); <<__PHPStdLib>> function hphp_process_abort($magic); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function hphp_to_string($v); diff --git a/hphp/hack/hhi/stdlib/builtins_network.hhi b/hphp/hack/hhi/stdlib/builtins_network.hhi index 4393d633832..2d202b53741 100644 --- a/hphp/hack/hhi/stdlib/builtins_network.hhi +++ b/hphp/hack/hhi/stdlib/builtins_network.hhi @@ -73,13 +73,13 @@ function getprotobynumber($number); function getservbyname($service, $protocol); <<__PHPStdLib>> function getservbyport($port, $protocol); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function inet_ntop($in_addr); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function inet_pton($address); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function ip2long($ip_address); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function long2ip($proper_address); <<__PHPStdLib>> function dns_check_record($host, $type = null); diff --git a/hphp/hack/hhi/stdlib/builtins_options.hhi b/hphp/hack/hhi/stdlib/builtins_options.hhi index ab5bc5eb814..65f30b7eb72 100644 --- a/hphp/hack/hhi/stdlib/builtins_options.hhi +++ b/hphp/hack/hhi/stdlib/builtins_options.hhi @@ -114,7 +114,7 @@ function set_magic_quotes_runtime($new_setting); function set_time_limit($seconds); <<__PHPStdLib>> function sys_get_temp_dir(); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function version_compare($version1, $version2, $sop = null); <<__PHPStdLib>> function gc_enabled(); diff --git a/hphp/hack/hhi/stdlib/builtins_preg.hhi b/hphp/hack/hhi/stdlib/builtins_preg.hhi index 5d6c18952b4..f602e4a5a19 100644 --- a/hphp/hack/hhi/stdlib/builtins_preg.hhi +++ b/hphp/hack/hhi/stdlib/builtins_preg.hhi @@ -36,7 +36,7 @@ function preg_replace_callback_array($patterns_and_callbacks, $subject, $limit = -1, &$count = null) { } <<__PHPStdLib>> function preg_split($pattern, $subject, $limit = -1, $flags = 0) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function preg_quote($str, $delimiter = null) { } <<__PHPStdLib>> function preg_last_error() { } diff --git a/hphp/hack/hhi/stdlib/builtins_string.hhi b/hphp/hack/hhi/stdlib/builtins_string.hhi index 5d11225a448..5aa98692b90 100644 --- a/hphp/hack/hhi/stdlib/builtins_string.hhi +++ b/hphp/hack/hhi/stdlib/builtins_string.hhi @@ -31,25 +31,25 @@ const int LC_TIME = 2; const string HPHP_TRIM_CHARLIST = "\n\r\t\013\000 "; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function addcslashes($str, $charlist); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function stripcslashes($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function addslashes($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function stripslashes($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function bin2hex($str); <<__PHPStdLib>> function hex2bin($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function nl2br($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function quotemeta($str); <<__PHPStdLib>> function str_shuffle($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strrev($str); <<__PHPStdLib>> function strtolower($str); @@ -61,19 +61,19 @@ function ucfirst($str); function lcfirst($str); <<__PHPStdLib>> function ucwords($str, $delimiters = " \t\r\n\f\v"); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function trim($str, $charlist = HPHP_TRIM_CHARLIST)/*: string*/; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function ltrim($str, $charlist = HPHP_TRIM_CHARLIST)/*: string*/; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function rtrim($str, $charlist = HPHP_TRIM_CHARLIST)/*: string*/; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function chop($str, $charlist = HPHP_TRIM_CHARLIST); -<<__Deprecated('Use implode().'), __PHPStdLib>> +<<__Deprecated('Use implode().'), __PHPStdLib, __Rx>> function join($glue, $pieces = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_split($str, $split_length = 1); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function chunk_split($body, $chunklen = 76, $end = "\r\n"); <<__PHPStdLib>> function strtok($str, $token = null); @@ -91,17 +91,17 @@ function strtok($str, $token = null); */ <<__PHPStdLib>> function str_getcsv(?string $input, string $delimiter = ",", string $enclosure = "\"", string $escape = "\\"): array; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_replace($search, $replace, $subject, &$count = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_ireplace($search, $replace, $subject, &$count = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function substr_replace($str, $replacement, $start, $length = 0x7FFFFFFF); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function substr($str, $start, $length = 0x7FFFFFFF); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_pad($input, $pad_length, $pad_string = " ", $pad_type = STR_PAD_RIGHT); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_repeat($input, $multiplier); <<__PHPStdLib>> function wordwrap($str, $width = 75, $wordbreak = "\n", $cut = false); @@ -113,27 +113,27 @@ function htmlentities($str, $quote_style = ENT_COMPAT, $charset = "ISO-8859-1", function htmlspecialchars_decode($str, $quote_style = ENT_COMPAT); <<__PHPStdLib>> function htmlspecialchars($str, $quote_style = ENT_COMPAT, $charset = "ISO-8859-1", $double_encode = true); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function quoted_printable_encode($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function quoted_printable_decode($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function convert_uudecode($data); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function convert_uuencode($data); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_rot13($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function crc32($str); <<__PHPStdLib>> function crypt($str, $salt = ""); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function md5($str, $raw_output = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function sha1($str, $raw_output = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strtr($str, $from, $to = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function convert_cyr_string($str, $from, $to); <<__PHPStdLib>> function get_html_translation_table($table = 0, $quote_style = ENT_COMPAT); @@ -149,65 +149,65 @@ function localeconv(); function nl_langinfo($item); <<__PHPStdLib>> function vprintf($format, $args); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function vsprintf($format, $args); function sscanf($str, $format, ...); <<__PHPStdLib>> function money_format($format, $number); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function number_format($number, $decimals = 0, $dec_point = ".", $thousands_sep = ","); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strcmp($str1, $str2); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strncmp($str1, $str2, $len); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strnatcmp($str1, $str2); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strcasecmp($str1, $str2); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strncasecmp($str1, $str2, $len); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strnatcasecmp($str1, $str2); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strcoll($str1, $str2); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function substr_compare($main_str, $str, $offset, $length = PHP_INT_MAX, $case_insensitivity = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strchr($haystack, $needle); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strrchr($haystack, $needle); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strstr($haystack, $needle, bool $before_needle = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function stristr($haystack, $needle, bool $before_needle = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strpbrk($haystack, $char_list); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strpos($haystack, $needle, $offset = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function stripos($haystack, $needle, $offset = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strrpos($haystack, $needle, $offset = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strripos($haystack, $needle, $offset = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function substr_count($haystack, $needle, $offset = 0, $length = 0x7FFFFFFF); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strspn($str1, $str2, $start = 0, $length = 0x7FFFFFFF); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strcspn($str1, $str2, $start = 0, $length = 0x7FFFFFFF); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function strlen($vstr): int; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function count_chars($str, $mode = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function str_word_count($str, $format = 0, $charlist = ""); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function levenshtein($str1, $str2, $cost_ins = 1, $cost_rep = 1, $cost_del = 1); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function similar_text($first, $second, &$percent = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function soundex($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function metaphone($str, $phones = 0); function parse_str($str, &$arr = null); diff --git a/hphp/hack/hhi/stdlib/builtins_url.hhi b/hphp/hack/hhi/stdlib/builtins_url.hhi index 8e5433d7b67..2e0723cac70 100644 --- a/hphp/hack/hhi/stdlib/builtins_url.hhi +++ b/hphp/hack/hhi/stdlib/builtins_url.hhi @@ -20,23 +20,23 @@ const int PHP_URL_FRAGMENT = 7; const int PHP_QUERY_RFC1738 = 1; const int PHP_QUERY_RFC3986 = 2; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function base64_decode($data, $strict = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function base64_encode($data); <<__PHPStdLib>> function get_headers($url, $format = 0); <<__PHPStdLib>> function get_meta_tags($filename, $use_include_path = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function http_build_query($formdata, $numeric_prefix = null, $arg_separator = null, $enc_type = PHP_QUERY_RFC1738): string; <<__PHPStdLib>> function parse_url($url, $component = -1); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function rawurldecode($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function rawurlencode($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function urldecode($str); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function urlencode($str); diff --git a/hphp/hack/hhi/stdlib/builtins_variable.hhi b/hphp/hack/hhi/stdlib/builtins_variable.hhi index e150ee89cbc..86b16166d6b 100644 --- a/hphp/hack/hhi/stdlib/builtins_variable.hhi +++ b/hphp/hack/hhi/stdlib/builtins_variable.hhi @@ -12,17 +12,17 @@ function is_bool($var): bool; <<__Rx>> function is_int($var): bool; -<<__Deprecated('Use is_int().')>> +<<__Deprecated('Use is_int().'), __Rx>> function is_integer($var): bool; -<<__Deprecated('Use is_int().')>> +<<__Deprecated('Use is_int().'), __Rx>> function is_long($var): bool; -<<__Deprecated('Use is_float().')>> +<<__Deprecated('Use is_float().'), __Rx>> function is_double($var): bool; <<__Rx>> function is_float($var): bool; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function is_numeric($var): bool; -<<__Deprecated('Use is_float().')>> +<<__Deprecated('Use is_float().'), __Rx>> function is_real($var): bool; <<__Rx>> function is_string($var): bool; @@ -34,9 +34,9 @@ function is_object($var): bool; function is_resource($var): bool; <<__Rx>> function is_null($var): bool; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gettype($v); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function get_resource_type($handle); <<__PHPStdLib>> function settype(&$var, $type); @@ -48,7 +48,7 @@ function var_export($expression, $ret = false); function var_dump(<<__AcceptDisposable>> $expression, <<__AcceptDisposable>> ...$rest); <<__PHPStdLib>> function debug_zval_dump(<<__AcceptDisposable>> $variable); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function serialize($value); <<__PHPStdLib>> function unserialize($str, $class_whitelist = array()); diff --git a/hphp/hack/hhi/stdlib/builtins_xml.hhi b/hphp/hack/hhi/stdlib/builtins_xml.hhi index 170429500a3..85594c568bc 100644 --- a/hphp/hack/hhi/stdlib/builtins_xml.hhi +++ b/hphp/hack/hhi/stdlib/builtins_xml.hhi @@ -82,7 +82,7 @@ function xml_get_current_line_number($parser) { } function xml_get_error_code($parser) { } <<__PHPStdLib>> function xml_error_string($code) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function utf8_decode($data) { } -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function utf8_encode($data) { } diff --git a/hphp/hack/hhi/stdlib/builtins_zlib.hhi b/hphp/hack/hhi/stdlib/builtins_zlib.hhi index 0ddb8666a1f..5b7d108c723 100644 --- a/hphp/hack/hhi/stdlib/builtins_zlib.hhi +++ b/hphp/hack/hhi/stdlib/builtins_zlib.hhi @@ -18,13 +18,13 @@ const int FORCE_DEFLATE = 0; <<__PHPStdLib>> function gzclose($zp); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gzcompress(string $data, int $level = -1): mixed; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gzdecode(string $data, int $length = PHP_INT_MAX): mixed; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gzdeflate(string $data, int $level = -1): mixed; -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gzencode(string $data, int $level = -1): mixed; <<__PHPStdLib>> function gzeof($zp); @@ -36,7 +36,7 @@ function gzgetc($zp); function gzgets($zp, $length = 1024); <<__PHPStdLib>> function gzgetss($zp, $length = 0, $allowable_tags = null); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function gzinflate(string $data, int $length = 0): mixed; <<__PHPStdLib>> function gzopen($filename, $mode, $use_include_path = false); @@ -56,9 +56,9 @@ function gztell($zp); function gzuncompress(string $data, int $length = 0): mixed; <<__PHPStdLib>> function gzwrite($zp, $str, $length = 0); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function nzcompress($uncompressed); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function nzuncompress($compressed); <<__PHPStdLib>> function qlzcompress($data, $level = 1); @@ -66,9 +66,9 @@ function qlzcompress($data, $level = 1); function qlzuncompress(string $data, int $level = 1): mixed; <<__PHPStdLib>> function readgzfile($filename, $use_include_path = false); -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function zlib_decode(string $data, int $max_len = 0): mixed; // string or false -<<__PHPStdLib>> +<<__PHPStdLib, __Rx>> function zlib_encode(string $data, int $encoding, int $level = -1): mixed; <<__PHPStdLib>> function zlib_get_coding_type(); -- 2.11.4.GIT