PHP Manual

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

Edited by

Philip Olson

2007-06-17


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. 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 Functions
L. GMP Functions
LI. gnupg Functions
LII. Net_Gopher
LIII. Haru PDF Functions
LIV. hash Functions
LV. HTTP
LVI. Hyperwave Functions
LVII. Hyperwave API Functions
LVIII. i18n Functions
LIX. IBM Functions (PDO_IBM)
LX. IBM DB2, Cloudscape and Apache Derby Functions
LXI. ICAP Functions [removed]
LXII. iconv Functions
LXIII. ID3 Functions
LXIV. IIS Administration Functions
LXV. Image Functions
LXVI. Imagick Image Library
LXVII. IMAP, POP3 and NNTP Functions
LXVIII. Informix Functions
LXIX. Informix Functions (PDO_INFORMIX)
LXX. Ingres II Functions
LXXI. IRC Gateway Functions
LXXII. PHP / Java Integration
LXXIII. JSON Functions
LXXIV. KADM5
LXXV. LDAP Functions
LXXVI. libxml Functions
LXXVII. Lotus Notes Functions
LXXVIII. LZF Functions
LXXIX. Mail Functions
LXXX. Mailparse Functions
LXXXI. Mathematical Functions
LXXXII. MaxDB PHP Extension
LXXXIII. MCAL Functions
LXXXIV. Mcrypt Encryption Functions
LXXXV. MCVE (Monetra) Payment Functions
LXXXVI. Memcache Functions
LXXXVII. Mhash Functions
LXXXVIII. Mimetype Functions
LXXXIX. Ming functions for Flash
XC. Miscellaneous Functions
XCI. mnoGoSearch Functions
XCII. Microsoft SQL Server Functions
XCIII. Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
XCIV. Mohawk Software Session Handler Functions
XCV. mSQL Functions
XCVI. Multibyte String Functions
XCVII. muscat Functions
XCVIII. MySQL Functions
XCIX. MySQL Functions (PDO_MYSQL)
C. MySQL Improved Extension
CI. Ncurses Terminal Screen Control Functions
CII. Network Functions
CIII. Newt Functions
CIV. NSAPI-specific Functions
CV. Object Aggregation/Composition Functions
CVI. Object property and method call overloading
CVII. Oracle Functions
CVIII. ODBC Functions (Unified)
CIX. ODBC and DB2 Functions (PDO_ODBC)
CX. oggvorbis
CXI. OpenAL Audio Bindings
CXII. OpenSSL Functions
CXIII. Oracle Functions [deprecated]
CXIV. Oracle Functions (PDO_OCI)
CXV. Output Control Functions
CXVI. Ovrimos SQL Functions
CXVII. Paradox File Access
CXVIII. Parsekit Functions
CXIX. Process Control Functions
CXX. Regular Expression Functions (Perl-Compatible)
CXXI. PDF Functions
CXXII. PDO Functions
CXXIII. Phar archive stream and classes
CXXIV. PHP Options&Information
CXXV. POSIX Functions
CXXVI. Regular Expression Functions (POSIX Extended)
CXXVII. PostgreSQL Functions
CXXVIII. PostgreSQL Functions (PDO_PGSQL)
CXXIX. Printer Functions
CXXX. Program Execution Functions
CXXXI. PostScript document creation
CXXXII. Pspell Functions
CXXXIII. qtdom Functions
CXXXIV. Radius
CXXXV. Rar Functions
CXXXVI. GNU Readline
CXXXVII. GNU Recode Functions
CXXXVIII. RPM Header Reading Functions
CXXXIX. runkit Functions
CXL. SAM - Simple Asynchronous Messaging
CXLI. Satellite CORBA client extension [deprecated]
CXLII. SCA Functions
CXLIII. SDO Functions
CXLIV. SDO XML Data Access Service Functions
CXLV. SDO Relational Data Access Service Functions
CXLVI. Semaphore, Shared Memory and IPC Functions
CXLVII. SESAM Database Functions
CXLVIII. PostgreSQL Session Save Handler
CXLIX. Session Handling Functions
CL. Shared Memory Functions
CLI. SimpleXML functions
CLII. SNMP Functions
CLIII. SOAP Functions
CLIV. Socket Functions
CLV. Standard PHP Library (SPL) Functions
CLVI. SQLite Functions
CLVII. SQLite Functions (PDO_SQLITE)
CLVIII. Secure Shell2 Functions
CLIX. Statistics Functions
CLX. Stream Functions
CLXI. String Functions
CLXII. Shockwave Flash Functions
CLXIII. Swish Functions
CLXIV. Sybase Functions
CLXV. TCP Wrappers Functions
CLXVI. Tidy Functions
CLXVII. Tokenizer Functions
CLXVIII. Unicode Functions
CLXIX. URL Functions
CLXX. Variable Handling Functions
CLXXI. Verisign Payflow Pro Functions
CLXXII. vpopmail Functions
CLXXIII. W32api Functions
CLXXIV. WDDX Functions
CLXXV. win32ps Functions
CLXXVI. win32service Functions
CLXXVII. xattr Functions
CLXXVIII. xdiff Functions
CLXXIX. XML Parser Functions
CLXXX. XML-RPC Functions
CLXXXI. XMLReader functions
CLXXXII. XMLWriter Functions
CLXXXIII. XSL functions
CLXXXIV. XSLT Functions
CLXXXV. YAZ Functions
CLXXXVI. YP/NIS Functions
CLXXXVII. Zip File Functions
CLXXXVIII. Zlib Compression Functions
VII. PHP at the Core: A Hacker's Guide to the Zend Engine
44. The PHP 5 build system
45. Extension structure
46. Memory management
47. Working with variables
48. Writing functions
49. Working with classes and objects
50. Working with resources
51. Working with INI settings
52. Working with streams
53. PDO Driver How-To
54. Extension FAQs
55. Zend Engine 2 API reference
56. Zend Engine 1
57. The future: PHP 6 and Zend Engine 3
VIII. FAQ: Frequently Asked Questions
58. General Information
59. Mailing lists
60. Obtaining PHP
61. Database issues
62. Installation FAQ
63. Build Problems
64. Using PHP
65. PHP and HTML
66. PHP and COM
67. PHP and other languages
68. Migrating from PHP 2 to PHP 3
69. Migrating from PHP 3 to PHP 4
70. Migrating from PHP 4 to PHP 5
71. Miscellaneous Questions
IX. Appendices
A. History of PHP and related projects
B. Migrating from PHP 5.1.x to PHP 5.2.x
C. Migrating from PHP 5.0.x to PHP 5.1.x
D. Migrating from PHP 4 to PHP 5
E. Migrating from PHP 3 to PHP 4
F. Migrating from PHP/FI 2 to PHP 3
G. Debugging PHP
H. Configure options
I. php.ini directives
J. List of Supported Timezones
K. Extension Categorization
L. List of Function Aliases
M. List of Reserved Words
N. List of Resource Types
O. List of Supported Protocols/Wrappers
P. List of Available Filters
Q. List of Supported Socket Transports
R. PHP type comparison tables
S. List of Parser Tokens
T. Userland Naming Guide
U. About the manual
V. Open Publication License
W. Function Index