Function Reference

The rest of this book provides an alphabetical summary of the functions that are available in PHP. The synopsis for each function lists the expected argument types for the function, its return type, and the version of PHP in which the function was introduced. The possible types are int, double, string, array, void, and mixed. mixed means that the argument or return type can be of any type. Optional arguments are shown in square brackets. Note that PHP didn’t start tracking version numbers for functions until PHP 3.0, so functions that are listed as 3.0 are likely to have existed in Version 2.x.

As of PHP 4.3, approximately 2,750 functions came bundled with PHP. The bulk of these are in optional extensions. Out of these functions, I selected 1,404 for this pocket reference. Even with close to half the functions cut, I’m still pushing the limits of what the average pocket can hold without busting a few seams. Here’s a list of the function groups that survived the cut, followed by the ones that didn’t:

In

Apache, array, assert, aspell/pspell, base64, bcmath, bz2, calendar, crack, crc32, crypt, ctype, curl, date/time, dba, db, dbx, directory, DNS, exec, exif, file, ftp, gd, gettext, gmp, HTML, iconv, imap, iptc, java, lcg, ldap, link, mail, math, md5, mbstring, mcrypt, mhash, MySQL, Oracle 8, PDF, Perl regex, PostgreSQL, Posix, process control, recode, session, shmop, snmp, sockets, various standard built-in, syslog, SYSV shared mem/sem/msg, xml, xslt, zip, zlib. ...

Get PHP Pocket Reference, 2nd Edition now with O’Reilly online learning.

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