<?php



/** @kphp-extern-func-info generate-stub */
function get_engine_version() ::: string;
/** @kphp-extern-func-info generate-stub */
function get_kphp_cluster_name(): string;
/** @kphp-extern-func-info generate-stub */
function get_webserver_stats() ::: tuple(int, int, int, int);

/** @kphp-extern-func-info generate-stub */
function iconv ($input_encoding ::: string, $output_encoding ::: string, $input_str ::: string) ::: string | false;


/** @kphp-extern-func-info generate-stub */
function ini_set ($s ::: string, $v ::: string) ::: bool;



/** @kphp-extern-func-info cpp_template_call */
function instance_cache_fetch(string $type, string $key, bool $even_if_expired = false) ::: instance<^1>;

function instance_cache_store(string $key, object $value, int $ttl = 0) ::: bool;
/** @kphp-extern-func-info generate-stub */
function instance_cache_update_ttl(string $key, int $ttl = 0) ::: bool;
/** @kphp-extern-func-info generate-stub */
function instance_cache_delete(string $key) ::: bool;


/** @kphp-extern-func-info generate-stub */
function ip2long ($ip ::: string) ::: int | false;
/** @kphp-extern-func-info generate-stub */
function ip2ulong ($ip ::: string) ::: string | false;
/** @kphp-extern-func-info generate-stub */
function long2ip ($ip ::: int) ::: string;
/** @kphp-extern-func-info generate-stub */
function thread_pool_test_load($size ::: int, $n ::: int, $a ::: float, $b ::: float) ::: float;
/** @kphp-extern-func-info generate-stub */
function gethostbynamel ($name ::: string) ::: string[] | false;
/** @kphp-extern-func-info generate-stub */
function inet_pton ($address ::: string) ::: string | false;



/** @kphp-extern-func-info generate-stub */
function kphp_get_runtime_config() ::: mixed;


/** @kphp-extern-func-info generate-stub */
function memory_get_usage ($real_usage ::: bool = false) ::: int;
/** @kphp-extern-func-info generate-stub */
function memory_get_peak_usage ($real_usage ::: bool = false) ::: int;
/** @kphp-extern-func-info generate-stub */
function memory_get_total_usage() ::: int;
/** @kphp-extern-func-info generate-stub */
function memory_get_static_usage() ::: int;
/** @kphp-extern-func-info generate-stub */
function memory_get_detailed_stats() ::: int[];

/** @kphp-extern-func-info generate-stub */
function posix_getuid() ::: int;
/** @kphp-extern-func-info generate-stub */
function posix_getpwuid($uid ::: int) ::: mixed[] | false;

function kphp_extended_instance_cache_metrics_init(callable(string $key):string $normalization_function) ::: void;


function register_kphp_on_warning_callback(callable(string $warning_message, string[] $stacktrace):void $stacktrace) ::: void;
function register_kphp_on_oom_callback(callable():void $callback) ::: bool;


function getopt ($options ::: string, $longopt ::: array = array(), ?int &$rest_index = null) ::: mixed[] | false;

/** @kphp-extern-func-info generate-stub */
function profiler_set_function_label($label ::: string) ::: void;

define('LC_ALL', 6);
define('LC_COLLATE', 3);
define('LC_CTYPE', 0);
define('LC_MONETARY', 4);
define('LC_NUMERIC', 1);
define('LC_TIME', 2);
define('LC_MESSAGES', 5);

/** @kphp-extern-func-info generate-stub */
function setlocale ($category ::: int, $locale ::: string) ::: string | false;

/** @kphp-extern-func-info generate-stub */
function debug_backtrace() ::: string[][];

function estimate_memory_usage($value ::: any) ::: int;

/** @kphp-extern-func-info generate-stub */
function headers_list () ::: string[];
/** @kphp-extern-func-info generate-stub */
function send_http_103_early_hints($headers ::: string[]) ::: void;
/** @kphp-extern-func-info generate-stub */
function ignore_user_abort ($enable ::: ?bool = null) ::: int;
/** @kphp-extern-func-info generate-stub */
function flush() ::: void;

define('PHP_QUERY_RFC1738', 1);
define('PHP_QUERY_RFC3986', 2);


/** @kphp-extern-func-info generate-stub */
function prepare_search_query ($query ::: string) ::: string;

function http_build_query ($str ::: array, $numeric_prefix ::: string = '', $arg_separator ::: string = '&', $enc_type ::: int = PHP_QUERY_RFC1738) ::: string;
