Appendix A. Function Reference

This appendix describes the functions available in the standard PHP extensions. These are the extensions that PHP is built with if you give no --with or --enable options to configure. For each function, we’ve provided the function signature, showing the data types of the various arguments and which are mandatory or optional, as well as a brief description of the side effects, errors, and returned data structures.

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_count_values, array_diff, array_filter, array_flip, array_intersect, array_keys, array_map, array_merge, array_merge_recursive, array_multisort, array_pad, array_pop, array_push, array_rand, array_reduce, array_reverse, array_search, array_shift, array_slice, array_splice, array_sum, array_unique, array_unshift, array_values, array_walk, arsort, asort, compact, count, current, each, end, explode, extract, implode, in_array, key, key_exists, krsort, ksort, list, natcasesort, natsort, next, pos, prev, range, reset, rsort, shuffle, sizeof, sort, uasort, uksort, usort

Classes and objects

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

Date and time

checkdate , date, getdate, gettimeofday, gmdate, gmmktime, gmstrftime

Get Programming PHP now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.