start page | rating of books | rating of authors | reviews | copyrights

Programming PHPProgramming PHPSearch this book

Appendix A. Function Reference

Contents:

PHP Functions by Category
Alphabetical Listing of PHP Functions (a-e)
Alphabetical Listing of PHP Functions (f-i)
Alphabetical Listing of PHP Functions (j-q)
Alphabetical Listing of PHP Functions (r-z)

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.

A.1. 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, 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 , chdir, chgrp, chmod, chown, chroot, clearstatcache, closedir, copy, dirname, disk_free_space, disk_total_space, fclose, feof, fflush, fgetc, fgetcsv, fgets, fgetss, file, file_exists, fileatime, filectime, filegroup, fileinode, filemtime, fileowner, fileperms, filesize, filetype, flock, fopen, fpassthru, fputs, fread, fscanf, fseek, fstat, ftell, ftruncate, fwrite, getcwd, getlastmod, is_dir, is_executable, is_file, is_link, is_readable, is_uploaded_file, is_writable, is_writeable, link, linkinfo, lstat, mkdir, move_uploaded_file, opendir, pathinfo, pclose, readdir, readfile, readlink, realpath, rename, rewind, rewinddir, rmdir, set_file_buffer, stat, symlink, tempnam, tmpfile, touch, umask, unlink

Functions
call_user_func, call_user_func_array, create_function, func_get_arg, func_get_args, func_num_args, function_exists, get_defined_functions, get_extension_funcs, get_loaded_extensions, register_shutdown_function, register_tick_function, unregister_tick_function

HTTP
get_browser , get_meta_tags, header, headers_sent, parse_str, parse_url, rawurldecode, rawurlencode, setcookie

Mail
mail

Math
abs , acos, asin, atan, atan2, base_convert, bindec, ceil, cos, decbin, dechex, decoct, deg2rad, exp, floor, getrandmax, hexdec, lcg_value, log, log10, max, min, mt_getrandmax, mt_rand, mt_srand, number_format, octdec, pi, pow, rad2deg, rand, round, sin, sqrt, srand, tan

Network
checkdnsrr , fsockopen, gethostbyaddr, gethostbyname, gethostbynamel, getmxrr, getprotobyname, getprotobynumber, getservbyname, getservbyport, ip2long, long2ip, pfsockopen, socket_get_status, socket_set_blocking, socket_set_timeout

Output control
flush , ob_end_clean, ob_end_flush, ob_get_contents, ob_get_length, ob_gzhandler, ob_implicit_flush, ob_start

PHP options/info
assert , assert_options, dl, extension_loaded, get_cfg_var, get_current_user, get_extension_funcs, get_included_files, get_loaded_extensions, get_magic_quotes_gpc, get_required_files, getenv, getlastmod, getmyinode, getmypid, getrusage, highlight_file, highlight_string, ini_alter, ini_get, ini_restore, ini_set, localeconv, parse_ini_file, php_logo_guid, php_sapi_name, php_uname, phpcredits, phpinfo, phpversion, putenv, set_magic_quotes_runtime, set_time_limit, version_compare, zend_logo_guid, zend_version

Program execution
escapeshellarg , escapeshellcmd, exec, passthru, putenv, shell_exec, sleep, system, usleep

Strings
addcslashes , addslashes, base64_decode, base64_encode, chop, chr, chunk_split, convert_cyr_string, count_chars, crypt, echo, ereg, ereg_replace, eregi, eregi_replace, explode, get_html_translation_table, get_meta_tags, hebrev, hebrevc, highlight_string, htmlentities, htmlspecialchars, implode, iptcparse, join, levenshtein, localeconv, ltrim, md5, metaphone, nl2br, number_format, ord, parse_str, parse_url, print, printf, quoted_printable_decode, quotemeta, rtrim, setlocale, similar_text, soundex, split, spliti, sprintf, sql_regcase, sscanf, str_pad, str_repeat, str_replace strcasecmp, strchr, strcmp, strcoll, strcspn, strip_tags, stripcslashes, stristr, strlen, strnatcasecmp, strnatcmp, strncasecmp, strncmp, strpos, strrchr, strrev, strrpos, strspn, strstr, strtok, strtolower, strtoupper, strtr, substr, substr_count, substr_replace, trim, ucfirst, ucwords, vprintf, vsprintf, wordwrap

Type functions
doubleval , get_resource_type, gettype, intval, is_array, is_bool, is_double, is_float, is_int, is_integer, is_long, is_null, is_numeric, is_object, is_real, is_resource, is_scalar, is_string, settype, strval

URLs
base64_decode , base64_encode, parse_url, rawurldecode, rawurlencode, urldecode, urlencode

Variable functions
compact , empty, extract, get_defined_constants, get_defined_vars, import_request_variables, isset, list, print_r, putenv, serialize, uniqid, unserialize, unset, var_dump



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.