Preface
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl
with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web
developers to write dynamically generated pages quickly.
About this Manual
This manual is written in SGML using the DocBook DTD (http://www.ora.com/davenport/), using
DSSSL (http://www.jclark.com/dsssl/) (Document Style and Semantics Specification Language) for
formatting. The tools used for formatting HTML, TeX and RTF versions are Jade
(http://www.jclark.com/jade/), written by James Clark (http://www.jclark.com/bio.htm) and The Modular
DocBook Stylesheets (http://nwalsh.com/docbook/dsssl/) written by Norman Walsh (http://nwalsh.com/).
PHP’s documentation framework was assembled by Stig Sæther Bakken (mailto:stig@php.net).
List of Examples
1-1. An introductory example....................................................................................................................43
4-1. Ways of escaping from HTML...........................................................................................................78
6-1. Simple form va89
6-2. More complex form variables ............................................................................................................89
6-3. SetCookie Exa90
7-1. Defining Consta93
7-2. Using __FILE__ and __LINE__........................................................................................................93
13-1. GIF creation with PHP...................................................................................................................121
14-1. HTTP Authentication example ......................................................................................................122
14-2. HTTP Authentication example forcing a new name (exp 3pod.com)/password......................................................123
16-1. File Upload Form ...........................................................................................................................125
16-2. Uploading multiple forms ..............................................................................................................126
1. getallheaders() Example ......................................................................................................................142
1. array example....145
1. array_walk 146
1. arsort example..146
1. asort example....147
List of Tables
2-1. PHP Modules .....60
5-1. Escaped characters .............................................................................................................................??
9-1. Arithmetic Ope97
9-2. Bitwise Operator98
9-3. Logical Operator98
9-4. Comparson Op99
9-5. Operator Precedence ........................................................................................................................100
1. Calendar modes ...173
1. Calendar week modes..........................................................................................................................174
1. Font file format ....336
1. error_log log types ..........................................................................................................................372
1. error_reporting bit values ............................................................................................................373
1. LONGVARBINARY handling ............................................................................................................549
1. XML parser opti768
1. UTF-8 encoding...770
B-1. PHP Internal Types..........................................................................................................................779
C-2. Debugger Error Types ......................... |