PHP Functions by Category

This is a list of functions provided by PHP’s built-in extensions, grouped by category. Some functions fall under more than one header.

Arrays

array
array_merge_recursive
array_uintersect_assoc
array_chunk
array_multisort
array_uintersect_uassoc
array_combine
array_pad
array_unique
array_count_values
array_pop
array_unshift
array_diff
array_push
array_values
array_diff_assoc
array_rand
array_walk
array_diff_uassoc
array_reduce
array_walk_recursive
array_fill
array_reverse
arsort
array_filter
array_search
asort
array_flip
array_shift
compact
array_intersect
array_slice
count
array_intersect_assoc
array_splice
current
array_intersect_uassoc
array_sum
each
array_key_exists
array_udiff
end
array_keys
array_udiff_assoc
explode
array_map
array_udiff_uassoc
extract
array_merge
array_uintersect
implode
in_array
natsort
shuffle
key
next
sizeof
key_exists
pos
sort
krsort
prev
uasort
ksort
range
uksort
list
reset
usort
natcasesort
rsort

Classes and Objects

call_user_method
call_user_method_array
class_exists
get_class
get_class_methods
get_class_vars
get_declared_classes
get_declared_interfaces
get_object_vars
get_parent_class
is_subclass_of
method_exists

Date and Time

checkdate
date
getdate
gettimeofday
gmdate
gmmktime
gmstrftime
localtime
microtime
mktime
strftime
strtotime
time

Errors and Logging

assert
assert_options
closelog
crc32
define_syslog_variables
error_log
error_reporting
openlog
restore_error_handler
set_error_handler
syslog
trigger_error
user_error

Files, Directories, and Filesystem

basename
fileinode
is_writable
chdir
filemtime
is_writeable
chgrp
fileowner
link
chmod
fileperms ...

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.