PHP Manual

Mehdi Achour
Friedhelm Betz
Antony Dovgal
Nuno Lopes
Philip Olson
Georg Richter
Damien Seguy
Jakub Vrana
And several others


Table of Contents
Authors and Contributors
I. Getting Started
1. Introduction
2. A simple tutorial
II. Installation and Configuration
3. General Installation Considerations
4. Installation on Unix systems
5. Installation on Mac OS X
6. Installation on Windows systems
7. Installation of PECL extensions
8. Problems?
9. Runtime Configuration
III. Language Reference
10. Basic syntax
11. Types
12. Variables
13. Constants
14. Expressions
15. Operators
16. Control Structures
17. Functions
18. Classes and Objects (PHP 4)
19. Classes and Objects (PHP 5)
20. Exceptions
21. References Explained
IV. Security
22. Introduction
23. General considerations
24. Installed as CGI binary
25. Installed as an Apache module
26. Filesystem Security
27. Database Security
28. Error Reporting
29. Using Register Globals
30. User Submitted Data
31. Magic Quotes
32. Hiding PHP
33. Keeping Current
V. Features
34. HTTP authentication with PHP
35. Cookies
36. Sessions
37. Dealing with XForms
38. Handling file uploads
39. Using remote files
40. Connection handling
41. Persistent Database Connections
42. Safe Mode
43. Using PHP from the command line
VI. Function Reference
I. .NET Functions
II. Apache-specific Functions
III. Alternative PHP Cache
IV. Advanced PHP debugger
V. Array Functions
VI. Aspell functions [deprecated]
VII. BCMath Arbitrary Precision Mathematics Functions
VIII. PHP bytecode Compiler
IX. Bzip2 Compression Functions
X. Calendar Functions
XI. CCVS API Functions [deprecated]
XII. Class/Object Functions
XIII. Classkit Functions
XIV. ClibPDF Functions
XV. COM and .Net (Windows)
XVI. Crack Functions
XVII. Character Type Functions
XVIII. CURL, Client URL Library Functions
XIX. Cybercash Payment Functions
XX. Credit Mutuel CyberMUT functions
XXI. Cyrus IMAP administration Functions
XXII. Date and Time Functions
XXIII. DB++ Functions
XXIV. Database (dbm-style) Abstraction Layer Functions
XXV. dBase Functions
XXVI. DBM Functions [deprecated]
XXVII. dbx Functions
XXVIII. Direct IO Functions
XXIX. Directory Functions
XXX. DOM Functions
XXXI. DOM XML Functions
XXXII. enchant Functions
XXXIII. Error Handling and Logging Functions
XXXIV. Exif Functions
XXXV. Expect Functions
XXXVI. File Alteration Monitor Functions
XXXVII. Forms Data Format Functions
XXXVIII. Fileinfo Functions
XXXIX. filePro Functions
XL. Filesystem Functions
XLI. Filter Functions
XLII. Firebird/InterBase Functions
XLIII. Firebird/Interbase Functions (PDO_FIREBIRD)
XLIV. FriBiDi Functions
XLV. FrontBase Functions
XLVI. FTP Functions
XLVII. Function Handling Functions
XLVIII. GeoIP Functions
XLIX. Gettext
L. GMP Functions
LI. gnupg Functions
LII. Net_Gopher
LIII. hash Functions
LV. Hyperwave Functions
LVI. Hyperwave API Functions
LVII. IBM Functions (PDO_IBM)
LVIII. IBM DB2, Cloudscape and Apache Derby Functions
LIX. ICAP Functions [removed]
LX. iconv Functions
LXI. ID3 Functions
LXII. IIS Administration Functions
LXIII. Image Functions
LXIV. IMAP, POP3 and NNTP Functions
LXV. Informix Functions
LXVI. Informix Functions (PDO_INFORMIX)
LXVII. Ingres II Functions
LXVIII. IRC Gateway Functions
LXIX. PHP / Java Integration
LXX. JSON Functions
LXXII. LDAP Functions
LXXIII. libxml Functions
LXXIV. Lotus Notes Functions
LXXV. LZF Functions
LXXVI. Mail Functions
LXXVII. mailparse Functions
LXXVIII. Mathematical Functions
LXXIX. MaxDB PHP Extension
LXXX. MCAL Functions
LXXXI. Mcrypt Encryption Functions
LXXXII. MCVE (Monetra) Payment Functions
LXXXIII. Memcache Functions
LXXXIV. Mhash Functions
LXXXV. Mimetype Functions
LXXXVI. Ming functions for Flash
LXXXVII. Miscellaneous Functions
LXXXVIII. mnoGoSearch Functions
LXXXIX. Microsoft SQL Server Functions
XC. Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
XCI. Mohawk Software Session Handler Functions
XCII. mSQL Functions
XCIII. Multibyte String Functions
XCIV. muscat Functions
XCV. MySQL Functions
XCVII. MySQL Improved Extension
XCVIII. Ncurses Terminal Screen Control Functions
XCIX. Network Functions
C. Newt Functions
CI. NSAPI-specific Functions
CII. Object Aggregation/Composition Functions
CIII. Object property and method call overloading
CIV. Oracle Functions
CV. ODBC Functions (Unified)
CVI. ODBC and DB2 Functions (PDO_ODBC)
CVII. oggvorbis
CVIII. OpenAL Audio Bindings
CIX. OpenSSL Functions
CX. Oracle Functions [deprecated]
CXI. Oracle Functions (PDO_OCI)
CXII. Output Control Functions
CXIII. Ovrimos SQL Functions
CXIV. Paradox File Access
CXV. Parsekit Functions
CXVI. Process Control Functions
CXVII. Regular Expression Functions (Perl-Compatible)
CXVIII. PDF Functions
CXIX. PDO Functions
CXX. PHP Options&Information
CXXI. POSIX Functions
CXXII. Regular Expression Functions (POSIX Extended)
CXXIII. PostgreSQL Functions
CXXIV. PostgreSQL Functions (PDO_PGSQL)
CXXV. Printer Functions
CXXVI. Program Execution Functions
CXXVII. PostScript document creation
CXXVIII. Pspell Functions
CXXIX. qtdom Functions
CXXX. Radius
CXXXI. Rar Functions
CXXXII. GNU Readline
CXXXIII. GNU Recode Functions
CXXXIV. RPM Header Reading Functions
CXXXV. runkit Functions
CXXXVI. SAM - Simple Asynchronous Messaging
CXXXVII. Satellite CORBA client extension [deprecated]
CXXXIX. SDO XML Data Access Service Functions
CXL. SDO Relational Data Access Service Functions
CXLI. Semaphore, Shared Memory and IPC Functions
CXLII. SESAM Database Functions
CXLIII. PostgreSQL Session Save Handler
CXLIV. Session Handling Functions
CXLV. Shared Memory Functions
CXLVI. SimpleXML functions
CXLVII. SNMP Functions
CXLIX. Socket Functions
CL. Standard PHP Library (SPL) Functions
CLI. SQLite Functions
CLII. SQLite Functions (PDO_SQLITE)
CLIII. Secure Shell2 Functions
CLIV. Statistics Functions
CLV. Stream Functions
CLVI. String Functions
CLVII. Shockwave Flash Functions
CLVIII. Sybase Functions
CLIX. TCP Wrappers Functions
CLX. Tidy Functions
CLXI. Tokenizer Functions
CLXII. Unicode Functions
CLXIII. URL Functions
CLXIV. Variable Handling Functions
CLXV. Verisign Payflow Pro Functions
CLXVI. vpopmail Functions
CLXVII. W32api Functions
CLXIX. win32ps Functions
CLXX. win32service Functions
CLXXI. xattr Functions
CLXXII. xdiff Functions
CLXXIII. XML Parser Functions
CLXXV. XMLReader functions
CLXXVI. xmlwriter Functions
CLXXVII. XSL functions
CLXXIX. YAZ Functions
CLXXX. YP/NIS Functions
CLXXXI. Zip File Functions
CLXXXII. Zlib Compression Functions
VII. PHP and Zend Engine Internals
44. Streams API for PHP Extension Authors
45. PDO Driver How-To
46. Zend API: Hacking the Core of PHP
48. Extending PHP 3
VIII. FAQ: Frequently Asked Questions
49. General Information
50. Mailing lists
51. Obtaining PHP
52. Database issues
53. Installation FAQ
54. Build Problems
55. Using PHP
56. PHP and HTML
57. PHP and COM
58. PHP and other languages
59. Migrating from PHP 2 to PHP 3
60. Migrating from PHP 3 to PHP 4
61. Migrating from PHP 4 to PHP 5
62. Miscellaneous Questions
IX. Appendixes
A. History of PHP and related projects
B. Migrating from PHP 4 to PHP 5
C. Migrating from PHP 3 to PHP 4
D. Migrating from PHP/FI 2 to PHP 3
E. Debugging PHP
F. Configure options
G. php.ini directives
H. List of Supported Timezones
I. Extension Categorization
J. List of Function Aliases
K. List of Reserved Words
L. List of Resource Types
M. List of Supported Protocols/Wrappers
N. List of Available Filters
O. List of Supported Socket Transports
P. PHP type comparison tables
Q. List of Parser Tokens
R. Userland Naming Guide
S. About the manual
T. Open Publication License
U. Function Index