PHP Manual

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

Edited by

Gabor Hojtsy

2005-10-08


Table of Contents
Preface
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. Error Handling and Logging Functions
XXXIII. Exif Functions
XXXIV. Expect Functions
XXXV. File Alteration Monitor Functions
XXXVI. Forms Data Format Functions
XXXVII. filePro Functions
XXXVIII. Filesystem Functions
XXXIX. Firebird/InterBase Functions
XL. Firebird/Interbase Functions (PDO_FIREBIRD)
XLI. FriBiDi Functions
XLII. FrontBase Functions
XLIII. FTP Functions
XLIV. Function Handling Functions
XLV. Gettext
XLVI. GMP Functions
XLVII. Net_Gopher
XLVIII. HTTP Functions
XLIX. Hyperwave Functions
L. Hyperwave API Functions
LI. IBM DB2, Cloudscape and Apache Derby Functions
LII. ICAP Functions [deprecated]
LIII. iconv Functions
LIV. ID3 Functions
LV. IIS Administration Functions
LVI. Image Functions
LVII. IMAP, POP3 and NNTP Functions
LVIII. Informix Functions
LIX. Ingres II Functions
LX. IRC Gateway Functions
LXI. PHP / Java Integration
LXII. KADM5
LXIII. LDAP Functions
LXIV. libxml Functions
LXV. Lotus Notes Functions
LXVI. LZF Functions
LXVII. Mail Functions
LXVIII. mailparse Functions
LXIX. Mathematical Functions
LXX. MaxDB PHP Extension
LXXI. MCAL Functions
LXXII. Mcrypt Encryption Functions
LXXIII. MCVE Payment Functions
LXXIV. Memcache Functions
LXXV. Mhash Functions
LXXVI. Mimetype Functions
LXXVII. Ming functions for Flash
LXXVIII. Miscellaneous Functions
LXXIX. mnoGoSearch Functions
LXXX. Microsoft SQL Server Functions
LXXXI. Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
LXXXII. Mohawk Software Session Handler Functions
LXXXIII. mSQL Functions
LXXXIV. Multibyte String Functions
LXXXV. muscat Functions
LXXXVI. MySQL Functions
LXXXVII. MySQL Functions (PDO_MYSQL)
LXXXVIII. MySQL Improved Extension
LXXXIX. Ncurses Terminal Screen Control Functions
XC. Network Functions
XCI. Newt Functions
XCII. NSAPI-specific Functions
XCIII. Object Aggregation/Composition Functions
XCIV. Object property and method call overloading
XCV. Oracle functions
XCVI. ODBC Functions (Unified)
XCVII. ODBC and DB2 functions (PDO_ODBC)
XCVIII. oggvorbis
XCIX. OpenAL Audio Bindings
C. OpenSSL Functions
CI. Oracle Functions [deprecated]
CII. Oracle Functions (PDO_OCI)
CIII. Output Control Functions
CIV. Ovrimos SQL Functions
CV. Paradox File Access
CVI. Parsekit Functions
CVII. Process Control Functions
CVIII. Regular Expression Functions (Perl-Compatible)
CIX. PDF functions
CX. PDO Functions
CXI. PHP Options&Information
CXII. POSIX Functions
CXIII. Regular Expression Functions (POSIX Extended)
CXIV. PostgreSQL Functions
CXV. PostgreSQL Functions (PDO_PGSQL)
CXVI. Printer Functions
CXVII. Program Execution Functions
CXVIII. PostScript document creation
CXIX. Pspell Functions
CXX. qtdom Functions
CXXI. Radius
CXXII. Rar Functions
CXXIII. GNU Readline
CXXIV. GNU Recode Functions
CXXV. runkit Functions
CXXVI. Satellite CORBA client extension [deprecated]
CXXVII. SDO Functions
CXXVIII. SDO XML Data Access Service Functions
CXXIX. SDO Relational Data Access Service Functions
CXXX. Semaphore, Shared Memory and IPC Functions
CXXXI. SESAM Database Functions
CXXXII. PostgreSQL Session Save Handler
CXXXIII. Session Handling Functions
CXXXIV. Shared Memory Functions
CXXXV. SimpleXML functions
CXXXVI. SNMP Functions
CXXXVII. SOAP Functions
CXXXVIII. Socket Functions
CXXXIX. Standard PHP Library (SPL) Functions
CXL. SQLite Functions
CXLI. SQLite Functions (PDO_SQLITE)
CXLII. Secure Shell2 Functions
CXLIII. Stream Functions
CXLIV. String Functions
CXLV. Shockwave Flash Functions
CXLVI. Sybase Functions
CXLVII. TCP Wrappers Functions
CXLVIII. Tidy Functions
CXLIX. Tokenizer Functions
CL. Unicode Functions
CLI. URL Functions
CLII. Variable Handling Functions
CLIII. Verisign Payflow Pro Functions
CLIV. vpopmail Functions
CLV. W32api Functions
CLVI. WDDX Functions
CLVII. win32service Functions
CLVIII. xattr Functions
CLIX. xdiff Functions
CLX. XML Parser Functions
CLXI. XML-RPC Functions
CLXII. XMLReader functions
CLXIII. XSL functions
CLXIV. XSLT Functions
CLXV. YAZ Functions
CLXVI. YP/NIS Functions
CLXVII. Zip File Functions (Read Only Access)
CLXVIII. 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
47. Extending PHP 3
VIII. FAQ: Frequently Asked Questions
48. General Information
49. Mailing lists
50. Obtaining PHP
51. Database issues
52. Installation FAQ
53. Build Problems
54. Using PHP
55. PHP and HTML
56. PHP and COM
57. PHP and other languages
58. Migrating from PHP 2 to PHP 3
59. Migrating from PHP 3 to PHP 4
60. Migrating from PHP 4 to PHP 5
61. 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. About the manual
S. Open Publication License
T. Function Index