PHP functions, made easier.

A practical PHP reference for developers, with concise ShortPHP aliases and useful utilities. Find the function you need, see an example, and move to the next or previous reference.

search

Reference

Browse 170 static reference entries. PHP's canonical function names remain authoritative; ShortPHP adds compact aliases and utilities where they are genuinely useful.

ALIAS column()

array_column()

ShortPHP reference for array_column().

ALIAS filter()

array_filter()

ShortPHP reference for array_filter().

ALIAS first()

array_first()

ShortPHP reference for array_first().

ALIAS islist()

array_is_list()

ShortPHP reference for array_is_list().

ALIAS keys()

array_keys()

ShortPHP reference for array_keys().

ALIAS last()

array_last()

ShortPHP reference for array_last().

ALIAS map()

array_map()

ShortPHP reference for array_map().

ALIAS merge()

array_merge()

ShortPHP reference for array_merge().

ALIAS reduce()

array_reduce()

ShortPHP reference for array_reduce().

ALIAS vals()

array_values()

ShortPHP reference for array_values().

ALIAS b64d()

base64_decode()

ShortPHP reference for base64_decode().

ALIAS b64e()

base64_encode()

ShortPHP reference for base64_encode().

ALIAS base()

basename()

ShortPHP reference for basename().

ALIAS cnt()

count()

ShortPHP reference for count().

ALIAS cclose()

curl_close()

ShortPHP reference for curl_close().

ALIAS cerno()

curl_errno()

ShortPHP reference for curl_errno().

ALIAS cerr()

curl_error()

ShortPHP reference for curl_error().

ALIAS cesc()

curl_escape()

ShortPHP reference for curl_escape().

ALIAS cexec()

curl_exec()

ShortPHP reference for curl_exec().

ALIAS cinfo()

curl_getinfo()

ShortPHP reference for curl_getinfo().

ALIAS curl()

curl_init()

ShortPHP reference for curl_init().

ALIAS creset()

curl_reset()

ShortPHP reference for curl_reset().

ALIAS cset()

curl_setopt()

ShortPHP reference for curl_setopt().

ALIAS csets()

curl_setopt_array()

ShortPHP reference for curl_setopt_array().

ALIAS cunesc()

curl_unescape()

ShortPHP reference for curl_unescape().

ALIAS cver()

curl_version()

ShortPHP reference for curl_version().

ALIAS dt()

date()

ShortPHP reference for date().

ALIAS dir()

dirname()

ShortPHP reference for dirname().

ALIAS elog()

error_log()

ShortPHP reference for error_log().

ALIAS exists()

file_exists()

ShortPHP reference for file_exists().

ALIAS fgc()

file_get_contents()

ShortPHP reference for file_get_contents().

ALIAS fpc()

file_put_contents()

ShortPHP reference for file_put_contents().

ALIAS function_exists()

function_exists()

ShortPHP reference for function_exists().

ALIAS geterrhandler()

get_error_handler()

ShortPHP reference for get_error_handler().

ALIAS getexhandler()

get_exception_handler()

ShortPHP reference for get_exception_handler().

ALIAS env()

getenv()

ShortPHP reference for getenv().

ALIAS gleven()

grapheme_levenshtein()

ShortPHP reference for grapheme_levenshtein().

ALIAS h()

htmlspecialchars()

ShortPHP reference for htmlspecialchars().

ALIAS imgjpeg()

imagecreatefromjpeg()

ShortPHP reference for imagecreatefromjpeg().

ALIAS imgpng()

imagecreatefrompng()

ShortPHP reference for imagecreatefrompng().

ALIAS imgjpg()

imagejpeg()

ShortPHP reference for imagejpeg().

ALIAS imgout()

imagepng()

ShortPHP reference for imagepng().

ALIAS imgw()

imagesx()

ShortPHP reference for imagesx().

ALIAS imgh()

imagesy()

ShortPHP reference for imagesy().

ALIAS iget()

ini_get()

ShortPHP reference for ini_get().

ALIAS iset()

ini_set()

ShortPHP reference for ini_set().

ALIAS isdir()

is_dir()

ShortPHP reference for is_dir().

ALIAS isfile()

is_file()

ShortPHP reference for is_file().

ALIAS jdec()

json_decode()

ShortPHP reference for json_decode().

ALIAS jenc()

json_encode()

ShortPHP reference for json_encode().

ALIAS mbcheck()

mb_check_encoding()

ShortPHP reference for mb_check_encoding().

ALIAS mbenc()

mb_convert_encoding()

ShortPHP reference for mb_convert_encoding().

ALIAS mbdetect()

mb_detect_encoding()

ShortPHP reference for mb_detect_encoding().

ALIAS mbsl()

mb_strlen()

ShortPHP reference for mb_strlen().

ALIAS mbpos()

mb_strpos()

ShortPHP reference for mb_strpos().

ALIAS mblow()

mb_strtolower()

ShortPHP reference for mb_strtolower().

ALIAS mbup()

mb_strtoupper()

ShortPHP reference for mb_strtoupper().

ALIAS mbsub()

mb_substr()

ShortPHP reference for mb_substr().

ALIAS nf()

number_format()

ShortPHP reference for number_format().

ALIAS odec()

openssl_decrypt()

ShortPHP reference for openssl_decrypt().

ALIAS odigest()

openssl_digest()

ShortPHP reference for openssl_digest().

ALIAS oenc()

openssl_encrypt()

ShortPHP reference for openssl_encrypt().

ALIAS ornd()

openssl_random_pseudo_bytes()

ShortPHP reference for openssl_random_pseudo_bytes().

ALIAS phash()

password_hash()

ShortPHP reference for password_hash().

ALIAS pverify()

password_verify()

ShortPHP reference for password_verify().

ALIAS path()

pathinfo()

ShortPHP reference for pathinfo().

ALIAS phpver()

phpversion()

ShortPHP reference for phpversion().

ALIAS pm()

preg_match()

ShortPHP reference for preg_match().

ALIAS pma()

preg_match_all()

ShortPHP reference for preg_match_all().

ALIAS prp()

preg_replace()

ShortPHP reference for preg_replace().

ALIAS prr()

print_r()

ShortPHP reference for print_r().

ALIAS randbytes()

random_bytes()

ShortPHP reference for random_bytes().

ALIAS rnd()

random_int()

ShortPHP reference for random_int().

ALIAS real()

realpath()

ShortPHP reference for realpath().

ALIAS sxfile()

simplexml_load_file()

ShortPHP reference for simplexml_load_file().

ALIAS sxload()

simplexml_load_string()

ShortPHP reference for simplexml_load_string().

ALIAS has()

str_contains()

ShortPHP reference for str_contains().

ALIAS ends()

str_ends_with()

ShortPHP reference for str_ends_with().

ALIAS rep()

str_replace()

ShortPHP reference for str_replace().

ALIAS starts()

str_starts_with()

ShortPHP reference for str_starts_with().

ALIAS sl()

strlen()

ShortPHP reference for strlen().

ALIAS pos()

strpos()

ShortPHP reference for strpos().

ALIAS low()

strtolower()

ShortPHP reference for strtolower().

ALIAS ts()

strtotime()

ShortPHP reference for strtotime().

ALIAS up()

strtoupper()

ShortPHP reference for strtoupper().

ALIAS now()

time()

ShortPHP reference for time().

ALIAS trim()

trim()

ShortPHP reference for trim().

ALIAS dump()

var_dump()

ShortPHP reference for var_dump().

ALIAS zclose()

zip_close()

ShortPHP reference for zip_close().

ALIAS zname()

zip_entry_name()

ShortPHP reference for zip_entry_name().

ALIAS zread()

zip_entry_read()

ShortPHP reference for zip_entry_read().

ALIAS zopen()

zip_open()

ShortPHP reference for zip_open().

UTILITY after()

after()

ShortPHP reference for after().

UTILITY age()

age()

Calculate whole calendar years from a birth date.

UTILITY ago()

ago()

Format a timestamp as relative time.

UTILITY before()

before()

ShortPHP reference for before().

UTILITY between()

between()

ShortPHP reference for between().

UTILITY blank()

blank()

ShortPHP reference for blank().

UTILITY bytes()

bytes()

ShortPHP reference for bytes().

UTILITY camel()

camel()

Convert text to camelCase.

UTILITY clamp()

clamp()

Keep a number inside an inclusive range.

UTILITY collapse_spaces()

collapse_spaces()

Collapse whitespace runs to one space.

UTILITY contains()

contains()

Test whether an array contains a value.

UTILITY days_between()

days_between()

Return signed whole calendar days between dates.

UTILITY dd()

dd()

Dump values and terminate execution. Use only while debugging.

UTILITY duration()

duration()

ShortPHP reference for duration().

UTILITY env_bool()

env_bool()

Read an environment variable as a boolean.

UTILITY env_float()

env_float()

Read an environment variable as a float.

UTILITY env_int()

env_int()

Read an environment variable as an integer.

UTILITY excerpt()

excerpt()

Create a compact, word-aware excerpt.

UTILITY ext()

ext()

ShortPHP reference for ext().

UTILITY extension_available()

extension_available()

Check whether a PHP extension is loaded.

UTILITY filled()

filled()

ShortPHP reference for filled().

UTILITY find()

find()

Return the first array item matching a callback.

UTILITY find_key()

find_key()

Return the key of the first matching array item.

UTILITY flatten()

flatten()

Flatten nested arrays to a chosen depth.

UTILITY forget()

forget()

Remove a nested dot-notation array value.

UTILITY get()

get()

ShortPHP reference for get().

UTILITY group()

group()

ShortPHP reference for group().

UTILITY has_path()

has_path()

Check whether a nested dot-notation path exists.

UTILITY head()

head()

ShortPHP reference for head().

UTILITY http_delete()

http_delete()

Perform a DELETE request with cURL.

UTILITY http_get()

http_get()

Perform a GET request with cURL and return status, headers and body.

UTILITY http_patch()

http_patch()

Perform a PATCH request with cURL.

UTILITY http_post()

http_post()

Perform a POST request with cURL.

UTILITY http_put()

http_put()

Perform a PUT request with cURL.

UTILITY index()

index()

ShortPHP reference for index().

UTILITY initials()

initials()

Create initials from a name.

UTILITY is_email()

is_email()

ShortPHP reference for is_email().

UTILITY is_even()

is_even()

Test whether an integer is even.

UTILITY is_ip()

is_ip()

ShortPHP reference for is_ip().

UTILITY is_json()

is_json()

ShortPHP reference for is_json().

UTILITY is_odd()

is_odd()

Test whether an integer is odd.

UTILITY is_url()

is_url()

ShortPHP reference for is_url().

UTILITY is_uuid()

is_uuid()

ShortPHP reference for is_uuid().

UTILITY json_try_decode()

json_try_decode()

Decode JSON without throwing; return the supplied default on invalid JSON.

UTILITY json_try_encode()

json_try_encode()

Encode JSON without throwing; return the supplied default on failure.

UTILITY kebab()

kebab()

Convert text to kebab-case.

UTILITY mask()

mask()

Mask a string for presentation while retaining selected ends.

UTILITY mime()

mime()

ShortPHP reference for mime().

UTILITY omit()

omit()

ShortPHP reference for omit().

UTILITY ordinal()

ordinal()

ShortPHP reference for ordinal().

UTILITY partition()

partition()

Split an array into matching and non-matching items.

UTILITY percent()

percent()

ShortPHP reference for percent().

UTILITY php_at_least()

php_at_least()

Check whether the running PHP version meets a minimum.

UTILITY pick()

pick()

ShortPHP reference for pick().

UTILITY pluck()

pluck()

Extract one field from a list of arrays or objects.

UTILITY read_json()

read_json()

ShortPHP reference for read_json().

UTILITY redact()

redact()

Recursively replace sensitive array values.

UTILITY remove()

remove()

Remove one or more literal strings.

UTILITY replace_first()

replace_first()

Replace only the first literal occurrence.

UTILITY replace_last()

replace_last()

Replace only the last literal occurrence.

UTILITY set_path()

set_path()

Set a nested array value using dot notation.

UTILITY slugify()

slugify()

ShortPHP reference for slugify().

UTILITY snake()

snake()

Convert text to snake_case.

UTILITY sort_by()

sort_by()

Sort records by a field or property.

UTILITY tail()

tail()

ShortPHP reference for tail().

UTILITY timer_end()

timer_end()

Return elapsed seconds since timer_start().

UTILITY timer_start()

timer_start()

Start a high-resolution elapsed-time measurement.

UTILITY to_bool()

to_bool()

Convert common human-readable boolean values.

UTILITY token()

token()

ShortPHP reference for token().

UTILITY truncate()

truncate()

ShortPHP reference for truncate().

UTILITY unique()

unique()

Remove duplicate values while preserving first occurrence order.

UTILITY url_host()

url_host()

Extract the host component of a URL.

UTILITY url_path()

url_path()

Extract the path component of a URL.

UTILITY url_with()

url_with()

Add, replace or remove query parameters.

UTILITY uuid()

uuid()

ShortPHP reference for uuid().

UTILITY word_count()

word_count()

Count whitespace-separated words.

UTILITY words()

words()

Return at most N whitespace-separated words.

UTILITY write_json()

write_json()

ShortPHP reference for write_json().