PHP Manual

Stig Sæther Bakken
Alexander Aulbach
Egon Schmid
Jim Winstead
Lars Torben Wilson
Rasmus Lerdorf
Andrei Zmievski
Jouni Ahto

Edited by

Stig Sæther Bakken
Egon Schmid

22-11-2003


Table of Contents
Preface
I. Getting Started
1. Introduction
2. A simple tutorial
3. Installation
4. Runtime Configuration
II. Language Reference
5. Basic syntax
6. Types
7. Variables
8. Constants
9. Expressions
10. Operators
11. Control Structures
12. Functions
13. Classes and Objects
14. References Explained
III. Security
15. Security
IV. Features
16. HTTP authentication with PHP
17. Cookies
18. Handling file uploads
19. Using remote files
20. Connection handling
21. Persistent Database Connections
22. Safe Mode
23. Using PHP from the command line
V. Function Reference
I. Apache-specific Functions
II. Array Functions
III. Aspell functions [deprecated]
IV. BCMath Arbitrary Precision Mathematics Functions
V. Bzip2 Compression Functions
VI. Calendar functions
VII. CCVS API Functions
VIII. COM support functions for Windows
IX. Class/Object Functions
X. ClibPDF functions
XI. Crack functions
XII. CURL, Client URL Library Functions
XIII. Cybercash payment functions
XIV. Cyrus IMAP administration functions
XV. Character type functions
XVI. Database (dbm-style) abstraction layer functions
XVII. Date and Time functions
XVIII. dBase functions
XIX. DBM Functions [deprecated]
XX. dbx functions
XXI. DB++ Functions
XXII. Direct IO functions
XXIII. Directory functions
XXIV. DOM XML functions
XXV. .NET functions
XXVI. Error Handling and Logging Functions
XXVII. File alteration monitor functions
XXVIII. FrontBase Functions
XXIX. filePro functions
XXX. Filesystem functions
XXXI. Forms Data Format functions
XXXII. FriBiDi functions
XXXIII. FTP functions
XXXIV. Function Handling functions
XXXV. Gettext
XXXVI. GMP functions
XXXVII. HTTP functions
XXXVIII. Hyperwave functions
XXXIX. Hyperwave API functions
XL. iconv functions
XLI. Image functions
XLII. IMAP, POP3 and NNTP functions
XLIII. Informix functions
XLIV. InterBase functions
XLV. Ingres II functions
XLVI. IRC Gateway Functions
XLVII. PHP / Java Integration
XLVIII. LDAP functions
XLIX. Mail functions
L. mailparse functions
LI. Mathematical Functions
LII. Multi-Byte String Functions
LIII. MCAL functions
LIV. Mcrypt Encryption Functions
LV. MCVE Payment Functions
LVI. Mhash Functions
LVII. Mimetype Functions
LVIII. Microsoft SQL Server functions
LIX. Ming functions for Flash
LX. Miscellaneous functions
LXI. mnoGoSearch Functions
LXII. mSQL functions
LXIII. MySQL Functions
LXIV. Improved MySQL Extension
LXV. Mohawk Software session handler functions
LXVI. muscat functions
LXVII. Network Functions
LXVIII. Ncurses terminal screen control functions
LXIX. Lotus Notes functions
LXX. NSAPI-specific Functions
LXXI. Unified ODBC functions
LXXII. Object Aggregation/Composition Functions
LXXIII. Oracle 8 functions
LXXIV. OpenSSL functions
LXXV. Oracle functions
LXXVI. Ovrimos SQL functions
LXXVII. Output Control Functions
LXXVIII. Object property and method call overloading
LXXIX. PDF functions
LXXX. Verisign Payflow Pro functions
LXXXI. PHP Options&Information
LXXXII. POSIX functions
LXXXIII. PostgreSQL functions
LXXXIV. Process Control Functions
LXXXV. Program Execution functions
LXXXVI. Printer functions
LXXXVII. Pspell Functions
LXXXVIII. GNU Readline
LXXXIX. GNU Recode functions
XC. Regular Expression Functions (Perl-Compatible)
XCI. qtdom functions
XCII. Regular Expression Functions (POSIX Extended)
XCIII. Semaphore, Shared Memory and IPC Functions
XCIV. SESAM database functions
XCV. Session handling functions
XCVI. Shared Memory Functions
XCVII. SQLite
XCVIII. Shockwave Flash functions
XCIX. SNMP functions
C. Socket functions
CI. Stream functions
CII. String functions
CIII. Sybase functions
CIV. tidy Functions
CV. Tokenizer functions
CVI. URL Functions
CVII. Variable Functions
CVIII. vpopmail functions
CIX. W32api functions
CX. WDDX Functions
CXI. XML parser functions
CXII. XML-RPC functions
CXIII. XSLT functions
CXIV. YAZ functions
CXV. YP/NIS Functions
CXVI. Zip File Functions (Read Only Access)
CXVII. Zlib Compression Functions
VI. Zend API
24. Overview
25. Extension Possibilities
26. Source Layout
27. PHP's Automatic Build System
28. Creating Extensions
29. Using Extensions
30. Troubleshooting
31. Source Discussion
32. Accepting Arguments
33. Creating Variables
34. Duplicating Variable Contents: The Copy Constructor
35. Returning Values
36. Printing Information
37. Startup and Shutdown Functions
38. Calling User Functions
39. Initialization File Support
40. Where to Go from Here
41. Reference: Some Configuration Macros
42. API Macros
VII. PHP API: Interfaces for extension writers
43. Streams API for PHP Extension Authors
VIII. FAQ: Frequently Asked Questions
44. General Information
45. Mailing lists
46. Obtaining PHP
47. Database issues
48. Installation
49. Build Problems
50. Using PHP
51. PHP and HTML
52. PHP and COM
53. PHP and other languages
54. Migrating from PHP 2 to PHP 3
55. Migrating from PHP 3 to PHP 4
56. Miscellaneous Questions
IX. Appendixes
A. History of PHP and related projects
B. Migrating from PHP 3 to PHP 4
C. Migrating from PHP/FI 2 to PHP 3
D. Debugging PHP
E. Extending PHP 3
F. List of Function Aliases
G. List of Reserved Words
H. List of Resource Types
I. List of Supported Protocols/Wrappers
J. List of Supported Socket Transports
K. PHP type comparison tables
L. List of Parser Tokens
M. About the manual
N. Function Index