← All docs

Builtins

Index of all PHP builtins supported by Elephc.

Builtins

FunctionSignatureReturns
array_all()(mixed $array, mixed $callback): boolbool
array_any()(mixed $array, mixed $callback): boolbool
array_chunk()(array $array, int $length): arrayarray
array_column()(array $array, string $column_key): arrayarray
array_combine()(array $keys, array $values): arrayarray
array_diff()(array $array, ...$arrays): arrayarray
array_diff_assoc()(array $array, ...$arrays): mixedmixed
array_diff_key()(array $array, ...$arrays): arrayarray
array_fill()(int $start_index, int $count, mixed $value): arrayarray
array_fill_keys()(array $keys, mixed $value): arrayarray
array_filter()(array $array, callable $callback = null, int $mode = 0): arrayarray
array_find()(mixed $array, mixed $callback): mixedmixed
array_flip()(array $array): arrayarray
array_intersect()(array $array, ...$arrays): arrayarray
array_intersect_assoc()(array $array, ...$arrays): mixedmixed
array_intersect_key()(array $array, ...$arrays): arrayarray
array_is_list()(mixed $array): boolbool
array_key_exists()(string $key, array $array): boolbool
array_key_first()(array $array): mixedmixed
array_key_last()(array $array): mixedmixed
array_keys()(array $array): arrayarray
array_map()(callable $callback, array $array, ...$arrays): arrayarray
array_merge()(...$arrays): arrayarray
array_merge_recursive()(...$arrays): arrayarray
array_multisort()(array $array1, int $array2): boolbool
array_pad()(array $array, int $length, mixed $value): arrayarray
array_pop()(array $array): mixedmixed
array_product()(array $array): intint
array_push()(array $array, ...$values): voidvoid
array_rand()(array $array): intint
array_reduce()(array $array, callable $callback, mixed $initial = null): intint
array_replace()(array $array, array $replacements): mixedmixed
array_replace_recursive()(array $array, array $replacements): mixedmixed
array_reverse()(array $array): arrayarray
array_search()(mixed $needle, array $haystack, bool $strict = false): mixedmixed
array_shift()(array $array): mixedmixed
array_slice()(array $array, int $offset, int $length = null): arrayarray
array_splice()(array $array, int $offset, int $length = null): arrayarray
array_sum()(array $array): intint
array_udiff()(array $array1, array $array2, callable $callback): arrayarray
array_uintersect()(array $array1, array $array2, callable $callback): arrayarray
array_unique()(array $array): arrayarray
array_unshift()(array $array, ...$values): intint
array_values()(array $array): arrayarray
array_walk()(array $array, callable $callback): voidvoid
array_walk_recursive()(array $array, callable $callback): voidvoid
arsort()(array $array): boolbool
asort()(array $array): boolbool
call_user_func()(callable $callback, ...$args): mixedmixed
call_user_func_array()(callable $callback, array $args): mixedmixed
count()(array $value, int $mode = 0): intint
in_array()(mixed $needle, array $haystack, bool $strict = false): boolbool
krsort()(array $array): boolbool
ksort()(array $array): boolbool
natcasesort()(array $array): boolbool
natsort()(array $array): boolbool
range()(mixed $start, mixed $end): arrayarray
rsort()(array $array): boolbool
shuffle()(array $array): boolbool
sort()(array $array): boolbool
uasort()(array $array, callable $callback): boolbool
uksort()(array $array, callable $callback): boolbool
usort()(array $array, callable $callback): boolbool
buffer_free()(buffer $buffer): mixedmixed
buffer_len()(buffer $buffer): intint
class_alias()(string $class, string $alias, bool $autoload = true): boolbool
class_attribute_args()(string $class_name, string $attribute_name): arrayarray
class_attribute_names()(string $class_name): arrayarray
class_exists()(string $class, bool $autoload = true): boolbool
class_get_attributes()(string $class_name): arrayarray
class_implements()(mixed $object_or_class, bool $autoload = true): mixedmixed
class_parents()(mixed $object_or_class, bool $autoload = true): mixedmixed
class_uses()(mixed $object_or_class, bool $autoload = true): mixedmixed
enum_exists()(string $enum, bool $autoload = true): boolbool
function_exists()(string $function): boolbool
get_class()(object $object = null): stringstring
get_declared_classes()(): arrayarray
get_declared_interfaces()(): arrayarray
get_declared_traits()(): arrayarray
get_parent_class()(mixed $object_or_class = null): stringstring
interface_exists()(string $interface, bool $autoload = true): boolbool
is_a()(object $object_or_class, string $class, bool $allow_string = false): boolbool
is_subclass_of()(mixed $object_or_class, string $class, bool $allow_string = true): boolbool
trait_exists()(string $trait, bool $autoload = true): boolbool
checkdate()(int $month, int $day, int $year): boolbool
date()(string $format, int $timestamp = null): stringstring
date_default_timezone_get()(): stringstring
date_default_timezone_set()(string $timezoneId): boolbool
getdate()(int $timestamp = null): arrayarray
gmdate()(string $format, int $timestamp = null): stringstring
gmmktime()(int $hour, int $minute, int $second, int $month, int $day, int $year): intint
hrtime()(bool $as_number = false): mixedmixed
localtime()(int $timestamp = -1, bool $associative = false): arrayarray
microtime()(bool $as_float = false): mixedmixed
mktime()(int $hour, int $minute, int $second, int $month, int $day, int $year): intint
strtotime()(string $datetime, int $baseTimestamp = null): mixedmixed
time()(): intint
basename()(string $path, string $suffix = ''): stringstring
chdir()(string $directory): boolbool
chgrp()(string $filename, string $group): boolbool
chmod()(string $filename, int $permissions): boolbool
chown()(string $filename, string $user): boolbool
clearstatcache()(bool $clear_realpath_cache = false, string $filename = ''): voidvoid
copy()(string $from, string $to): boolbool
dirname()(string $path, int $levels = 1): stringstring
disk_free_space()(string $directory): floatfloat
disk_total_space()(string $directory): floatfloat
file_exists()(string $filename): boolbool
fileatime()(string $filename): mixedmixed
filectime()(string $filename): mixedmixed
filegroup()(string $filename): mixedmixed
fileinode()(string $filename): mixedmixed
filemtime()(string $filename): intint
fileowner()(string $filename): mixedmixed
fileperms()(string $filename): mixedmixed
filesize()(string $filename): intint
filetype()(string $filename): mixedmixed
fnmatch()(string $pattern, string $filename, int $flags = 0): boolbool
getcwd()(): stringstring
getenv()(string $name): mixedmixed
glob()(string $pattern): arrayarray
is_dir()(string $filename): boolbool
is_executable()(string $filename): boolbool
is_file()(string $filename): boolbool
is_link()(string $filename): boolbool
is_readable()(string $filename): boolbool
is_writable()(string $filename): boolbool
is_writeable()(string $filename): boolbool
lchgrp()(string $filename, string $group): boolbool
lchown()(string $filename, string $user): boolbool
link()(string $target, string $link): boolbool
linkinfo()(string $path): intint
lstat()(string $filename): mixedmixed
mkdir()(string $directory): boolbool
pathinfo()(string $path, int $flags = 15): arrayarray
putenv()(string $assignment): boolbool
readfile()(string $filename): mixedmixed
readlink()(string $path): mixedmixed
realpath()(string $path): mixedmixed
realpath_cache_get()(): arrayarray
realpath_cache_size()(): intint
rename()(string $from, string $to): boolbool
rmdir()(string $directory): boolbool
scandir()(string $directory): arrayarray
stat()(string $filename): mixedmixed
symlink()(string $target, string $link): boolbool
sys_get_temp_dir()(): stringstring
tempnam()(string $directory, string $prefix): stringstring
tmpfile()(): mixedmixed
touch()(string $filename, int $mtime = null, int $atime = null): boolbool
umask()(int $mask = null): intint
unlink()(string $filename): boolbool
closedir()(resource $dir_handle): voidvoid
fclose()(resource $stream): boolbool
fdatasync()(resource $stream): boolbool
feof()(resource $stream): boolbool
fflush()(resource $stream): boolbool
fgetc()(resource $stream): mixedmixed
fgetcsv()(resource $stream, int $length = null, string $separator = ','): arrayarray
fgets()(resource $stream): mixedmixed
file()(string $filename): arrayarray
file_get_contents()(string $filename): mixedmixed
file_put_contents()(string $filename, string $data): intint
flock()(resource $stream, int $operation, bool $would_block = null): boolbool
fopen()(string $filename, string $mode, bool $use_include_path = false, mixed $context = null): mixedmixed
fpassthru()(resource $stream): intint
fprintf()(resource $stream, string $format, ...$values): intint
fputcsv()(resource $stream, array $fields, string $separator = ',', string $enclosure = '"'): intint
fread()(resource $stream, int $length): stringstring
fscanf()(resource $stream, string $format, ...$vars): arrayarray
fseek()(resource $stream, int $offset, int $whence = 0): intint
fstat()(resource $stream): mixedmixed
fsync()(resource $stream): boolbool
ftell()(resource $stream): intint
ftruncate()(resource $stream, int $size): boolbool
fwrite()(resource $stream, string $data): intint
gethostbyaddr()(string $ip): mixedmixed
gethostbyname()(string $hostname): stringstring
gethostname()(): stringstring
getprotobyname()(string $protocol): mixedmixed
getprotobynumber()(int $protocol): mixedmixed
getservbyname()(string $service, string $protocol): mixedmixed
getservbyport()(int $port, string $protocol): mixedmixed
hash_file()(string $algo, string $filename, bool $binary = false): mixedmixed
opendir()(string $directory): mixedmixed
readdir()(resource $dir_handle): mixedmixed
rewind()(resource $stream): boolbool
rewinddir()(resource $dir_handle): voidvoid
stream_bucket_make_writeable()(mixed $brigade): mixedmixed
stream_bucket_new()(resource $stream, string $buffer): mixedmixed
stream_context_create()(array $options = null, array $params = null): mixedmixed
stream_context_get_default()(array $options = null): mixedmixed
stream_context_get_options()(resource $context): arrayarray
stream_context_get_params()(resource $context): arrayarray
stream_context_set_default()(array $options): mixedmixed
stream_context_set_option()(resource $context, string $wrapper_or_options, string $option_name = null, mixed $value = null): boolbool
stream_context_set_params()(resource $context, array $params): boolbool
stream_copy_to_stream()(resource $from, resource $to, int $length = null, int $offset = -1): mixedmixed
stream_filter_register()(string $filter_name, string $class): boolbool
stream_filter_remove()(resource $stream_filter): boolbool
stream_get_contents()(resource $stream, int $length = null, int $offset = -1): mixedmixed
stream_get_filters()(): arrayarray
stream_get_line()(resource $stream, int $length, string $ending = ''): stringstring
stream_get_meta_data()(resource $stream): arrayarray
stream_get_transports()(): arrayarray
stream_get_wrappers()(): arrayarray
stream_is_local()(resource $stream): boolbool
stream_isatty()(resource $stream): boolbool
stream_resolve_include_path()(string $filename): mixedmixed
stream_select()(array $read, array $write, array $except, int $seconds, int $microseconds = 0): intint
stream_set_blocking()(resource $stream, bool $enable): boolbool
stream_set_chunk_size()(resource $stream, int $size): intint
stream_set_read_buffer()(resource $stream, int $size): intint
stream_set_timeout()(resource $stream, int $seconds, int $microseconds = 0): boolbool
stream_set_write_buffer()(resource $stream, int $size): intint
stream_socket_accept()(resource $socket, float $timeout = null, string $peer_name = null): mixedmixed
stream_socket_client()(string $address): mixedmixed
stream_socket_enable_crypto()(resource $stream, bool $enable, int $crypto_method = null, resource $session_stream = null): boolbool
stream_socket_get_name()(resource $socket, bool $remote): mixedmixed
stream_socket_pair()(int $domain, int $type, int $protocol): mixedmixed
stream_socket_recvfrom()(resource $socket, int $length, int $flags = 0, string $address = ''): mixedmixed
stream_socket_sendto()(resource $socket, string $data, int $flags = 0, string $address = ''): mixedmixed
stream_socket_server()(string $address): mixedmixed
stream_socket_shutdown()(resource $stream, int $mode): boolbool
stream_supports_lock()(resource $stream): boolbool
stream_wrapper_register()(string $protocol, string $class, int $flags = 0): boolbool
stream_wrapper_restore()(string $protocol): boolbool
stream_wrapper_unregister()(string $protocol): boolbool
vfprintf()(resource $stream, string $format, array $values): intint
json_decode()(string $json, bool $associative = null, int $depth = 512, int $flags = 0): mixedmixed
json_encode()(mixed $value, int $flags = 0, int $depth = 512): stringstring
json_last_error()(): intint
json_last_error_msg()(): stringstring
json_validate()(string $json, int $depth = 512, int $flags = 0): boolbool
abs()(int $num): mixedmixed
acos()(float $num): floatfloat
asin()(float $num): floatfloat
atan()(float $num): floatfloat
atan2()(float $y, float $x): floatfloat
ceil()(float $num): floatfloat
clamp()(int $value, int $min, int $max): mixedmixed
cos()(float $num): floatfloat
cosh()(float $num): floatfloat
deg2rad()(float $num): floatfloat
exp()(float $num): floatfloat
fdiv()(float $num1, float $num2): floatfloat
floor()(float $num): floatfloat
fmod()(float $num1, float $num2): floatfloat
hypot()(float $x, float $y): floatfloat
intdiv()(int $num1, int $num2): intint
is_finite()(float $num): boolbool
is_infinite()(float $num): boolbool
is_nan()(float $num): boolbool
log()(float $num, float $base = 2.718281828459045): floatfloat
log10()(float $num): floatfloat
log2()(float $num): floatfloat
max()(mixed $value, ...$values): mixedmixed
min()(mixed $value, ...$values): mixedmixed
mt_rand()(int $min, int $max): intint
pi()(): floatfloat
pow()(float $num, float $exponent): floatfloat
rad2deg()(float $num): floatfloat
rand()(int $min, int $max): intint
random_int()(int $min, int $max): intint
round()(float $num, int $precision = 0): floatfloat
sin()(float $num): floatfloat
sinh()(float $num): floatfloat
sqrt()(float $num): floatfloat
tan()(float $num): floatfloat
tanh()(float $num): floatfloat
buffer_new()(int $length): mixedmixed
define()(string $constant_name, mixed $value): boolbool
defined()(string $constant_name): boolbool
empty()(mixed $value): boolbool
header()(string $header, bool $replace = true, int $response_code = 0): voidvoid
http_response_code()(int $response_code = 0): intint
isset()(mixed $var, ...$vars): boolbool
php_uname()(string $mode = 'a'): stringstring
phpversion()(): stringstring
print_r()(mixed $value, bool $return = false): mixedmixed
serialize()(mixed $value): stringstring
unserialize()(string $data, mixed $options = []): mixedmixed
unset()(mixed $var, ...$vars): voidvoid
var_dump()(mixed $value, ...$values): voidvoid
ptr()(mixed $value): mixedmixed
ptr_get()(pointer $pointer): intint
ptr_is_null()(pointer $pointer): boolbool
ptr_null()(): mixedmixed
ptr_offset()(pointer $pointer, int $offset): mixedmixed
ptr_read16()(pointer $pointer): intint
ptr_read32()(pointer $pointer): intint
ptr_read8()(pointer $pointer): intint
ptr_read_string()(pointer $pointer, int $length): stringstring
ptr_set()(pointer $pointer, mixed $value): voidvoid
ptr_sizeof()(string $type): intint
ptr_write16()(pointer $pointer, int $value): voidvoid
ptr_write32()(pointer $pointer, int $value): voidvoid
ptr_write8()(pointer $pointer, int $value): voidvoid
ptr_write_string()(pointer $pointer, string $string): intint
zval_free()(pointer $zval): voidvoid
zval_pack()(mixed $value): pointerpointer
zval_type()(pointer $zval): intint
zval_unpack()(pointer $zval): mixedmixed
die()(int $status): voidvoid
exec()(string $command): stringstring
exit()(int $status): voidvoid
passthru()(string $command): voidvoid
pclose()(resource $handle): intint
popen()(string $command, string $mode): mixedmixed
readline()(string $prompt = null): mixedmixed
shell_exec()(string $command): stringstring
sleep()(int $seconds): intint
system()(string $command): stringstring
usleep()(int $microseconds): voidvoid
mb_ereg_match()(string $pattern, string $subject, string $options = null): boolbool
preg_match()(string $pattern, string $subject, array $matches = []): intint
preg_match_all()(string $pattern, string $subject): intint
preg_replace()(string $pattern, string $replacement, string $subject): stringstring
preg_replace_callback()(string $pattern, callable $callback, string $subject): stringstring
preg_split()(string $pattern, string $subject, int $limit = -1, int $flags = 0): arrayarray
iterator_apply()(traversable $iterator, callable $callback, array $args = null): intint
iterator_count()(traversable $iterator): intint
iterator_to_array()(traversable $iterator, bool $preserve_keys = true): arrayarray
spl_autoload()(string $class, string $file_extensions = null): voidvoid
spl_autoload_call()(string $class): voidvoid
spl_autoload_extensions()(string $file_extensions = null): stringstring
spl_autoload_functions()(): arrayarray
spl_autoload_register()(callable $callback = null, bool $throw = true, bool $prepend = false): boolbool
spl_autoload_unregister()(callable $callback): boolbool
spl_classes()(): arrayarray
spl_object_hash()(object $object): stringstring
spl_object_id()(object $object): intint
fsockopen()(string $hostname, int $port, int $error_code = null, string $error_message = null, float $timeout = null): mixedmixed
pfsockopen()(string $hostname, int $port, int $error_code = null, string $error_message = null, float $timeout = null): mixedmixed
stream_bucket_append()(mixed $brigade, mixed $bucket): voidvoid
stream_bucket_prepend()(mixed $brigade, mixed $bucket): voidvoid
stream_filter_append()(resource $stream, string $filtername, int $read_write = 3, mixed $params = null): mixedmixed
stream_filter_prepend()(resource $stream, string $filtername, int $read_write = 3, mixed $params = null): mixedmixed
addslashes()(string $string): stringstring
base64_decode()(string $string): stringstring
base64_encode()(string $string): stringstring
bin2hex()(string $string): stringstring
chop()(string $string, string $characters = ' \n\r\t\x0b\x0c\x00'): stringstring
chr()(int $codepoint): stringstring
crc32()(string $string): intint
explode()(string $separator, string $string, int $limit = PHP_INT_MAX): arrayarray
grapheme_strrev()(string $string): mixedmixed
gzcompress()(string $data, int $level = -1): stringstring
gzdeflate()(string $data, int $level = -1): stringstring
gzinflate()(string $data, int $max_length = 0): mixedmixed
gzuncompress()(string $data, int $max_length = 0): mixedmixed
hash()(string $algo, string $data, bool $binary = false): stringstring
hash_algos()(): arrayarray
hash_copy()(resource $context): mixedmixed
hash_equals()(string $known_string, string $user_string): boolbool
hash_final()(resource $context, bool $binary = false): stringstring
hash_hmac()(string $algo, string $data, string $key, bool $binary = false): stringstring
hash_init()(string $algo, int $flags = 0, string $key = ''): mixedmixed
hash_update()(resource $context, string $data): boolbool
hex2bin()(string $string): stringstring
html_entity_decode()(string $string): stringstring
htmlentities()(string $string, int $flags = 11, string $encoding = 'UTF-8'): stringstring
htmlspecialchars()(string $string, int $flags = 11, string $encoding = 'UTF-8'): stringstring
implode()(string $separator, array $array = null): stringstring
inet_ntop()(string $ip): mixedmixed
inet_pton()(string $ip): mixedmixed
ip2long()(string $ip): mixedmixed
lcfirst()(string $string): stringstring
long2ip()(int $ip): stringstring
ltrim()(string $string, string $characters = ' \n\r\t\x0b\x0c\x00'): stringstring
md5()(string $string, bool $binary = false): stringstring
nl2br()(string $string): stringstring
number_format()(float $num, int $decimals = 0, string $decimal_separator = '.', string $thousands_separator = ','): stringstring
ord()(string $character): intint
printf()(string $format, ...$values): intint
rawurldecode()(string $string): stringstring
rawurlencode()(string $string): stringstring
rtrim()(string $string, string $characters = ' \n\r\t\x0b\x0c\x00'): stringstring
sha1()(string $string, bool $binary = false): stringstring
sprintf()(string $format, ...$values): stringstring
sscanf()(string $string, string $format, ...$vars): arrayarray
str_contains()(string $haystack, string $needle): boolbool
str_ends_with()(string $haystack, string $needle): boolbool
str_ireplace()(string $search, string $replace, string $subject, int $count = null): stringstring
str_pad()(string $string, int $length, string $pad_string = ' ', int $pad_type = 1): stringstring
str_repeat()(string $string, int $times): stringstring
str_replace()(string $search, string $replace, string $subject, int $count = null): stringstring
str_split()(string $string, int $length = 1): arrayarray
str_starts_with()(string $haystack, string $needle): boolbool
strcasecmp()(string $string1, string $string2): intint
strcmp()(string $string1, string $string2): intint
stripslashes()(string $string): stringstring
strlen()(string $string): intint
strpos()(string $haystack, string $needle, int $offset = 0): mixedmixed
strrev()(string $string): stringstring
strrpos()(string $haystack, string $needle, int $offset = 0): mixedmixed
strstr()(string $haystack, string $needle, bool $before_needle = false): stringstring
strtolower()(string $string): stringstring
strtoupper()(string $string): stringstring
substr()(string $string, int $offset, int $length = null): stringstring
substr_replace()(string $string, string $replace, int $offset, int $length = null): stringstring
trim()(string $string, string $characters = ' \n\r\t\x0b\x0c\x00'): stringstring
ucfirst()(string $string): stringstring
ucwords()(string $string, string $separators = ' \t\r\n\x0c\x0b'): stringstring
urldecode()(string $string): stringstring
urlencode()(string $string): stringstring
vprintf()(string $format, array $values): intint
vsprintf()(string $format, array $values): stringstring
wordwrap()(string $string, int $width = 75, string $break = '\n', bool $cut_long_words = false): stringstring
boolval()(mixed $value): boolbool
ctype_alnum()(string $text): boolbool
ctype_alpha()(string $text): boolbool
ctype_digit()(string $text): boolbool
ctype_space()(string $text): boolbool
floatval()(mixed $value): floatfloat
get_resource_id()(resource $resource): intint
get_resource_type()(resource $resource): stringstring
gettype()(mixed $value): stringstring
intval()(mixed $value): intint
is_array()(mixed $value): boolbool
is_bool()(mixed $value): boolbool
is_callable()(mixed $value): boolbool
is_float()(mixed $value): boolbool
is_int()(mixed $value): boolbool
is_iterable()(mixed $value): boolbool
is_null()(mixed $value): boolbool
is_numeric()(mixed $value): boolbool
is_object()(mixed $value): boolbool
is_resource()(mixed $value): boolbool
is_scalar()(mixed $value): boolbool
is_string()(mixed $value): boolbool
settype()(mixed $var, string $type): boolbool