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-11-25
Copyright
© 1997-2005 the PHP Documentation Group
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.
gnupg Functions
XLVIII.
Net_Gopher
XLIX.
HTTP Functions
L.
Hyperwave Functions
LI.
Hyperwave API Functions
LII.
IBM DB2, Cloudscape and Apache Derby Functions
LIII.
ICAP Functions [deprecated]
LIV.
iconv Functions
LV.
ID3 Functions
LVI.
IIS Administration Functions
LVII.
Image Functions
LVIII.
IMAP, POP3 and NNTP Functions
LIX.
Informix Functions
LX.
Ingres II Functions
LXI.
IRC Gateway Functions
LXII.
PHP / Java Integration
LXIII.
KADM5
LXIV.
LDAP Functions
LXV.
libxml Functions
LXVI.
Lotus Notes Functions
LXVII.
LZF Functions
LXVIII.
Mail Functions
LXIX.
mailparse Functions
LXX.
Mathematical Functions
LXXI.
MaxDB PHP Extension
LXXII.
MCAL Functions
LXXIII.
Mcrypt Encryption Functions
LXXIV.
MCVE (Monetra) Payment Functions
LXXV.
Memcache Functions
LXXVI.
Mhash Functions
LXXVII.
Mimetype Functions
LXXVIII.
Ming functions for Flash
LXXIX.
Miscellaneous Functions
LXXX.
mnoGoSearch Functions
LXXXI.
Microsoft SQL Server Functions
LXXXII.
Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
LXXXIII.
Mohawk Software Session Handler Functions
LXXXIV.
mSQL Functions
LXXXV.
Multibyte String Functions
LXXXVI.
muscat Functions
LXXXVII.
MySQL Functions
LXXXVIII.
MySQL Functions (PDO_MYSQL)
LXXXIX.
MySQL Improved Extension
XC.
Ncurses Terminal Screen Control Functions
XCI.
Network Functions
XCII.
Newt Functions
XCIII.
NSAPI-specific Functions
XCIV.
Object Aggregation/Composition Functions
XCV.
Object property and method call overloading
XCVI.
Oracle functions
XCVII.
ODBC Functions (Unified)
XCVIII.
ODBC and DB2 functions (PDO_ODBC)
XCIX.
oggvorbis
C.
OpenAL Audio Bindings
CI.
OpenSSL Functions
CII.
Oracle Functions [deprecated]
CIII.
Oracle Functions (PDO_OCI)
CIV.
Output Control Functions
CV.
Ovrimos SQL Functions
CVI.
Paradox File Access
CVII.
Parsekit Functions
CVIII.
Process Control Functions
CIX.
Regular Expression Functions (Perl-Compatible)
CX.
PDF functions
CXI.
PDO Functions
CXII.
PHP Options&Information
CXIII.
POSIX Functions
CXIV.
Regular Expression Functions (POSIX Extended)
CXV.
PostgreSQL Functions
CXVI.
PostgreSQL Functions (PDO_PGSQL)
CXVII.
Printer Functions
CXVIII.
Program Execution Functions
CXIX.
PostScript document creation
CXX.
Pspell Functions
CXXI.
qtdom Functions
CXXII.
Radius
CXXIII.
Rar Functions
CXXIV.
GNU Readline
CXXV.
GNU Recode Functions
CXXVI.
RPM Header Reading Functions
CXXVII.
runkit Functions
CXXVIII.
Satellite CORBA client extension [deprecated]
CXXIX.
SDO Functions
CXXX.
SDO XML Data Access Service Functions
CXXXI.
SDO Relational Data Access Service Functions
CXXXII.
Semaphore, Shared Memory and IPC Functions
CXXXIII.
SESAM Database Functions
CXXXIV.
PostgreSQL Session Save Handler
CXXXV.
Session Handling Functions
CXXXVI.
Shared Memory Functions
CXXXVII.
SimpleXML functions
CXXXVIII.
SNMP Functions
CXXXIX.
SOAP Functions
CXL.
Socket Functions
CXLI.
Standard PHP Library (SPL) Functions
CXLII.
SQLite Functions
CXLIII.
SQLite Functions (PDO_SQLITE)
CXLIV.
Secure Shell2 Functions
CXLV.
statistics Functions
CXLVI.
Stream Functions
CXLVII.
String Functions
CXLVIII.
Shockwave Flash Functions
CXLIX.
Sybase Functions
CL.
TCP Wrappers Functions
CLI.
Tidy Functions
CLII.
Tokenizer Functions
CLIII.
Unicode Functions
CLIV.
URL Functions
CLV.
Variable Handling Functions
CLVI.
Verisign Payflow Pro Functions
CLVII.
vpopmail Functions
CLVIII.
W32api Functions
CLIX.
WDDX Functions
CLX.
win32service Functions
CLXI.
xattr Functions
CLXII.
xdiff Functions
CLXIII.
XML Parser Functions
CLXIV.
XML-RPC Functions
CLXV.
XMLReader functions
CLXVI.
XSL functions
CLXVII.
XSLT Functions
CLXVIII.
YAZ Functions
CLXIX.
YP/NIS Functions
CLXX.
Zip File Functions (Read Only Access)
CLXXI.
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
Next
Preface