-
- Weitere Informationen zu diesem Buch:
Inhaltsverzeichnis | Index | Probekapitel | Rezensionen |
Beispiele |
- Weitere Informationen zu diesem Buch:
Second Edition Mai 2006
ISBN 978-0-596-00681-5
Weitere Informationen zu diesem Buch
Inhaltsverzeichnis |
Index |
Probekapitel |
Rezensionen |
Beispiele |
Index
[ Symbols ], [ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ], [ Y ], [ Z ],
Symbols[ Top ]
+ (addition) operator, 40
+ (assertion) operator, 40
++ (autoincrement) operator, 41
-- (autodecrement) operator, 41
$_COOKIE array, 166
/ (division) operator, 40
$_ENV array, 166
$_FILES array, 166
$_GET array, 166
% (modulus) operator, 40
* (multiplication) operator, 40
- (negation) operator, 40
$_POST array, 166
$_SERVER array, 166
_ _sleep function, 160
- (subtraction) operator, 40
_ _wakeup function, 160
A[ Top ]
abs function, 385
abstract methods, 151
Access, ODBC and, 374
accessing databases, 196
accessor macros, zval data type, 340-342
acos function, 385
acosh function, 385
ad hoc documents, XML, 262
addcslashes function, 385
addition operator (+), 40
addslashes function, 87
AliasNbPages( ) method, 254
alpha channel, images, 242
alternatives, regular expressions, 100
anchors
Perl-compatible regular expressions, 107
POSIX-style regular expressions, 103
announcement to newgroup, 2
anonymous functions, 73
antialiasing, 227
API, COM and, 367
approximate equality of strings, 90
architecture, 321
arithmetic operators, 40
+ (addition), 40
+ (assertion), 40
/ (division), 40
% (modulus), 40
* (multiplication), 40
- (negation), 40
- (subtraction), 40
array_change_key_case function, 386
array_chunk function, 124, 386
array_combine function, 386
array_count_values function, 387
array_diff function, 139, 141, 387
array_diff_assoc function, 387
array_diff_uassoc function, 387
array_fill function, 387
array_filter function, 140, 388
array_flip function, 137, 388
array_intersect function, 388
array_intersect_assoc function, 388
array_intersect_uassoc function, 388
array_key_exists( ) function, 125
array_keys function, 125, 389
array_map function, 389
array_merge function, 139, 389
array_merge_recursive function, 390
array_multisort function, 136, 390
array_pad function, 122, 390
array_pop function, 141, 391
array_push function, 141, 391
array_rand function, 391
array_reduce function, 131, 391
array_reverse function, 137, 391
array_search function, 391
array_shift function, 392
array_slice function, 124, 392
array_splice function, 126, 392
array_sum function, 139, 392
array_udiff function, 392
array_udiff_assoc function, 393
array_udiff_uassoc function, 393
array_uintersect function, 393
array_uintersect_assoc function, 394
array_uintersect_uassoc function, 394
array_unique function, 140, 394
array_unshift function, 394
array_values function, 395
array_walk function, 395
array_walk_recursive function, 395
arrays, 29
$_COOKIE, 166
associative, 119
chunks, 124
creating, 29
from variables, 128
creating variables from, 127
data storage, 120-123
difference, calculating, 139
elements, 120
calling functions for, 131
existence, 125
filtering, 140
inserting, 126
removing, 126
sorting, 29
$_ENV, 166
$_FILES, 166
for loops and, 130
foreach construct and, 128
functions, 377
$_GET, 166
indexed, 119
iterator functions, 129
keys, 125
looping through, 29
merging, 139
multidimensional, 123
padding, 122
$_POST, 166
reducing, 131
reversing, 137
$_SERVER, 166
sets, 140
size, 122
slicing, 124
sorting
ascending orders, 134
descending order, 134
multiple at once, 136
natural order sort, 136
one at a time, 133
random order, 138
stacks, 141
sum, 139
values
multiple, 123
ranges, assigning, 122
searches, 132
arsort function, 395
asin function, 395
asinh function, 395
asort function, 396
ASP, embedding PHP and, 61
assert function, 396
assert_options function, 396
assertion operator (+), 40
assignment operators, 47
associative arrays, 119
associativity of operators, 38
atan function, 396
atan2 function, 396
atanh function, 397
attributes, PDF text, 250
autodecrement operator (--), 41
autoincrement operator (++), 41
B[ Top ]
backreferences, Perl-compatible regular expressions, 109
base_convert function, 397
base64_decode function, 397
base64_encode function, 397
basename function, 397
BCMath Arbitrary Precision Mathematics extension, 491
benchmarking, 315
bin2hex function, 397
bindec function, 398
bitwise operators, 43
Boolean values, 28
browser-supplied filenames in upload, security and, 295
buffers
flushing, 307
output buffering, 306-308
error handlers, 312
buttons, images, 236-239
C[ Top ]
caching
dynamically generated buttons, 237
reverse-proxy cache, 318
Calendar extension, 492
call_user_func function, 398
call_user_func_array function, 398
call_user_method function, 398
call_user_method_array function, 398
callback parameter, 306
calling functions, 63
array elements, 131
case folder, XML, 270
case sensitivity, 18
strings, 83
casting, implicit, 39
casting operators, 45
ceil function, 398
cells, PDFs, 248
character classes
Perl-compatible regular expressions, 107
POSIX-style expressions, 102
character classes, regular expressions, 99
character data handler, XML, 266
character encoding, XML, 269
character strings, 82-83
chdir function, 399
checkdate function, 399
checkdnsrr function, 399
chgrp function, 399
chmod function, 399
chop function, 400
chown function, 400
chr function, 400
chroot function, 400
chunk_split function, 400
class_exists function, 153, 400
class_implements function, 401
class_parents function, 401
classes, 144
character classes
Perl-compatible regular expressions, 107
POSIX-style regular expressions, 102
regular expressions, 99
declaring, 146
abstract, 151
constants declaration, 149
constructors, 152
destructors, 152
inheritance, 150
interfaces, 150
method declaration, 147
property declaration, 148
existence, 153
functions, 378
names, identifiers, 24
object-oriented design and, 30
subclasses, 144
cleaning strings, 82
clearstatcache function, 401
clients, XML, 283
client-side GUI applications, 1
closedir function, 401
code
including from another module, 57-59
portable
end-of-line, 364
environment, 364
external commands, 365
mail and, 364
platform definition, 363
platform-specific extensions, 365
security, 299
templating systems, 303-306
code libraries, 302
color, 240
color index, 243
images, true color, 241
palette, 227
true color
color indexes, 243
formats, 228
COM, 366, 492
API and, 367
functions, 367
RPC, 366
Word documents, 368-371
command line, extensions and, 323
command-line scripting, 1
commands, shell, security and, 300
comments, 20-22
C-style, 21
shell-style, 20
compact function, 128
comparing strings
approximate equality, 90
exact, 89
comparison operators, 41
compiling extensions, 330
into PHP, 331
standalone, 330
compressing output, 308
concatenation, string concatenation operator, 40
conditional expressions, Perl-compatible regular expressions, 113
config.m4 file, 333
dependencies, 333
configuration
DSN, 372
to web server, 360
on Windows, 359-363
configuration page, 10
connection_aborted function, 402
connection_status function, 402
connections, databases, 202
constant function, 402
constants
declaring, 149
identifiers, 24
constructors, 152
content types, response headers, 183
convert_cyr_string function, 402
convert_uudecode function, 402
convert_uuencode function, 403
cookies, 186-189
alternatives, 191
sessions and, combining, 194
storage, 192-195
coordinates, PDFs, 248
copy function, 403
cos function, 403
cosh function, 403
count function, 122, 403
count_chars function, 403
cPDF extension, 492
crc32 function, 404
create_function function, 404
cross-site scripting (XXS), security and, 293
crypt function, 404
C-string encoding, 88
C-style comments, 21
ctype extension, 492
ctype_alnum function, 404
ctype_alpha function, 404
ctype_cntrl function, 405
ctype_digit function, 405
ctype_graph function, 405
ctype_lower function, 405
ctype_print function, 405
ctype_punct function, 405
ctype_space function, 406
ctype_upper function, 406
ctype_xdigit function, 406
CURL extension, 492
current function, 129, 406
cut, Perl-compatible regular expressions, 112
D[ Top ]
Data Manipulation Language (DML), 198
data source name (see DSN)
data types
arrays, 29
floating-point numbers, 26
integers, 25
NULL, 31
objects, 30
pval, 338
resources, 30
strings, 27
zval, 338
accessor macros, 340-342
MAKE_STD_ZVAL( ) macro, 339
SEPARATE_ZVAL( ) macro, 339
zval_copy_ctor funtion, 340
databases, 12-14
access, 196
connections, 202
disconnecting, 205
execute( ) method, 206
executeMultiple( ) method, 206
metadata, 210
placeholders, 205
prepare( ) method, 206
queries
issuing, 202
response details, 208
results, 203
sample application, 211-221, 224
sequences, 210
shortcuts, 207
transactions, 210
date and time functions, 378
date function, 406
date_sunrise function, 407
date_sunset function, 408
DB_FETCHMODE_OBJECT mode, 204
dBase extension, 493
DBM-Style Database Abstraction extension, 493
dbx extension, 493
debug_backtrace function, 408
debug_print_backtrace function, 408
decbin function, 409
dechex function, 409
declarations, classes, 146
abstract methods, 151
constants declaration, 149
constructors, 152
destructors, 152
inheritance and, 150
interfaces, 150
method declaration, 147
property declaration, 148
declare statement, 56
declaring variables, 32
decoct function, 409
decomposing strings
exploding/imploding, 94
tokenizing, 94
decomposing URLs, 97
default handler, XML, 269
define function, 409
defined function, 409
defining functions, 64-66
DELETE statement (SQL), 198
delimiters, Perl-compatible regular expressions, 106
destructors, 152
difference, array sets, 141
dir function, 410
directories, functions, 379
dirname function, 410
disconnecting from databases, 205
disk_free_space function, 410
disk_total_space function, 410
diskfreespace function, 410
division operator (/), 40
dl function, 411
DML (Data Manipulation Language), 198
dns_check_record function, 411
dns_get_mx function, 411
Document Type Definition (DTD), 262
DOM XML extension, 493
parsing XML, 277
double-quoted strings, 76
doubleval function, 411
downloads
source distribution, 7
Windows distribution, 360
DSN (data source name), 201
configuration, 372
DTD (Document Type Definition), 262
dynamic XML, RSS and, 263
dynamically generated buttons, 236-239
caching, 237
E[ Top ]
each function, 129
echo command, printing strings, 78
echoing content, 62
EG (Executor Globals), 351
EGPCS (environment, GET, POST, cookies and server), 165
elements in arrays, 120
calling functions for, 131
existence, 125
filtering, 140
inserting, 126
removing, 126
embedding images in web page, 225
encapsulation, 144
end of line, portable code and, 364
end function, 129
entities, XML, unparsed, 268
entity handlers, XML, 267
entity-quoting HTML syntax characters, strings, 84
entity-quoting special characters, strings, 84
environment, GET, POST, cookies and server (EGPCS), 165
ereg function, 103, 412
ereg_replace function, 105, 412
eregi function, 104, 412
eregi_replace function, 412
error checking, PEAR DB, 202
error handlers
defining, 311-313
logging in, 311
output buffering, 312
error reporting, 309
error_log function, 413
error_reporting function, 309, 311, 413
errors
functions, 378
notices, 309
parse errors, 309
suppressing, 310
triggering, 310
warnings, 309
XML, 271
escape output, security and, 290-293
escape sequences, 74
single-quoted strings, 75
escapeshellarg function, 414
escapeshellcmd function, 414
exec function, 414
execute( ) method, 206
executeMultiple( ) method, 206
execution time, optimization, 317
Executor Globals (EG), 351
EXIF extension, 493
exit statement, 57
exp function, 414
expiration, response headers, 183
explode function, 414
exploding strings, 94
expressions, 36
ext_skel tool, 325
Extensible Markup Language (see XML)
Extensible Stylesheet Language Transformations (see XSLT)
extension_loaded function, 414
extensions
BCMath Arbitrary Precision Mathematics, 491
Calendar, 492
COM, 492
command line and, 323
compiling, 330
into PHP, 331
standalone, 330
config.m4 file, 333
dependencies, 333
cPDF, 492
ctype, 492
CURL, 492
dBase, 493
DBM-Style Database Abstraction, 493
dbx, 493
DOM XML, 493
EXIF, 493
FDF, 494
File Alteration Monitor, 494
filePro, 494
FrontBase, 494
FTP, 494
Gd/gd2, 494
gettext, 495
global variables
EG, 351
internal extension globals, 351
SG, 351
GMP, 495
Hyperwave, 495
iconv, 495
IMAP, 495
Informix, 496
Ingres II, 496
INI entries, 354
InterBase, 496
IRC Gateway, 496
Java, 496
LDAP, 496
mcrypt, 497
MCVE, 497
memory mangement, 336-338
mhash, 497
Microsoft SQL Server, 497
Ming, 497
mnoGoSearch, 497
msession, 498
mSQL, 498
MySQL, 498
NNTP, 495
ODBC, 498
openssl, 499
Oracle, 499
OvrimosSQL, 499
parameter handling, 342
planning, 324
POP3, 495
PostgreSQL, 499
pspell, 500
Readline, 500
Recode, 500
references, 349
resources, 356
shmop, 500
skeleton, 325
rot13.c file, 326-330
SNMP, 500
sockets, 501
software tools necessary, 323
Sybase, 501
System V Semaphore, 501
testing, 332
tidy, 501
variables, creating, 353
Verisign Payflow Pro, 499
WDDX, 501
XML Parser, 501
YAZ, 502
YP/NIS, 502
zlib compression, 502
extensions to distribution, 362
external commands, portable code, 365
external entities, XML, 267
extract function, 127, 415
F[ Top ]
fclose function, 415
FDF extension, 494
feof function, 415
fetchInto( ) method, 203
fetchRow( ) method, 203
fgetc function, 416
fgetcsv function, 416
fgets function, 416
fgetss function, 416
file access, security and, 296-299
File Alteration Monitor extension, 494
file function, 416
file_get_contents function, 417
file_put_contents function, 418
filectime function, 417
filegroup function, 417
fileinode function, 417
filemtime function, 418
filenames, security and, 292
fileowner function, 418
fileperms function, 418
filePro extension, 494
files
functions, 379
uploading, forms and, 179
filesize function, 418
filesystem functions, 379
filetype function, 419
filling filesystem in upload, security and, 295
filtering array elements, 140
filtering input, 285-290
floating-point numbers, 26
flock function, 419
floor function, 419
flow-control statements, 49-57
flush function, 420
flushing the buffer, 307
fmod function, 420
fnmatch function, 420
fonts, 233
TrueType fonts, 234
footer( ) method, 254
footers in PDFs, 253
fopen function, 420
for loops, arrays and, 130
for statement, 54
foreach construct, arrays and, 128
foreach statement, 56
format specifiers, printf function, 79
formats, images, 230
forms, 10-12
file uploads, 179
methods and, 168
pages, self-processing, 172
parameters, 169
automatic quoting, 170
multivalued, 175
sticky multivalued parameters, 177
processing, 168-182
sticky, 174
validation, 180-182
fpassthru function, 421
FPDF library, 246
cells, 248
images, 255
fprintf function, 421
fputs function, 421
fread function, 421
FrontBase extension, 494
fscanf function, 422
fseek function, 422
fsockopen function, 422
fstat function, 422
ftell function, 423
FTP extension, 494
ftruncate function, 423
func_get_arg function, 423
func_get_args function, 423
func_num_args function, 423
function parameters, 35
function_exists function, 424
functions, 388, 400, 412
anonymous, 73
arrays, 377
calling, 63
classes, 378
COM, 367
date and time, 378
defining, 64-66
directories, 379
errors, 378
files, 379
filesystem, 379
HTTP, 380
images, 380
info, 382
iterator, arrays and, 129
logging, 378
mail, 380
math, 381
names, identifiers, 23
objects, 378
output control, 381
parameters, 63
default, 69
missing, 71
passing by reference, 68
passing by value, 68
variable, 70
Perl-compatible regular expressions, 113-117
PHP options, 382
POSIX-style regular expressions, 103
program execution, 382
return values, 71
returning values
arrays, 346
objects, 347
simple types, 345
strings, 383
type, 384
URLs, 384
variable, 72
(see also individual functions)
fwrite function, 424
G[ Top ]
garbage collection, 35
GD, 226
color, 240
fonts, 233
TrueType fonts, 234
image-drawing functions, 231
Gd/gd2 extension, 494
GET requests, 169
idempotence, 169
get_browser function, 424
get_cfg_var function, 424
get_class function, 424
get_class_methods function, 425
get_class_vars function, 425
get_current_user function, 425
get_declared_classes function, 425
get_declared_interfaces function, 425
get_defined_constants function, 425
get_defined_functions function, 426
get_defined_vars function, 426
get_extension_funcs function, 426
get_headers function, 426
get_html_translation_table function, 426
get_include_path function, 428
get_included_files function, 428
get_loaded_extensions function, 428
get_magic_quotes_gpc function, 428
get_magic_quotes_runtime function, 428
get_meta_tags function, 86, 428
get_object_vars function, 429
get_parent_class function, 429
get_required_files function, 429
get_resource_type function, 429
getcwd function, 430
getdate function, 430
getenv function, 430
gethostbyaddr function, 430
gethostbyname function, 430
gethostbynamel function, 431
getimagesize function, 427
getlastmod function, 431
getListOf( ) method, 210
getmxrr function, 431
getmygid function, 429
getmyinode function, 431
getmypid function, 431
getmyuid function, 429
getprotobyname function, 431
getprotobynumber function, 431
getrandmax function, 432
getrusage function, 432
getservbyname function, 432
getservbyport function, 432
gettext extension, 495
gettimeofday function, 432
gettype function, 433
glob function, 433
global arrays, EGPCS information, 166
global scope, 34
global variables, 67
extensions and
EG, 351
internal extension globals, 351
SG, 351
gmdate function, 433
gmmktime function, 434
GMP extension, 495
gmstrftime function, 434
graphics, 15
(see also images)
greedy quantifiers, 108
growth of PHP, 6
GUI applications, client-side, 1
H[ Top ]
handlers
error handlers, 311-313
methods as, parsing XML and, 272
header function, 434
header( ) method, 254
headers
PDFs, 253
response, 182-185
authentication, 184
expiration, 183
redirections, 183
headers_list function, 434
headers_sent function, 434
hebrev function, 434
hebrevc function, 435
heredocs, 74
strings, 76
hexdec function, 435
highlight_file function, 435
highlight_string function, 435
history of PHP, 2-6
HTML (Hypertext Markup Language)
entity-quoting HTML syntax characters, 84
entity-quoting special characters, 84
tags, removing from strings, 86
html_entity_decode function, 436
htmlentities function, 84, 435
htmlspecialchars function, 84, 436
HTTP (Hypertext Transfer Protocol)
functions, 380
methods, 164
Server header, 165
User Agent header, 165
http_build_query function, 437
Hypertext Markup Language (see HTML)
Hypertext Transfer Protocol (see HTTP)
Hyperwave extension, 495
hypot function, 437
I[ Top ]
iconv extension, 495
idate function, 437
idempotence, 169
identifiers, 23
classes, names, 24
constants, 24
functions, 23
variable names, 23
if statement, 49-51
ignore_user_abort function, 438
image_type_to_mime_type function, 438
ImageColorAllocate function, 229
ImageCreate function, 229
ImageCreateFromJPEG function, 231
ImageCreateFromPNG function, 231
images
alpha channel, 242
antialiasing, 227
buttons, dynamically generated, 236-239
color, 240
color index, 243
true color color indexes, 243
true color images, 241
creating, 228-232
drawing, 228-232
functions, 231
embedding in web page, 225
existing files, 231
file formats, 227
formats supported, 230
FPDF library, 255
functions, 380
GD and, 226
output format, 230
palette, 227
PDFs, 255
scaling, 239
text and, 232
fonts, 233
TrueType fonts, 234
text representation, 244
transparency, 227
ImageTypes function, 230
IMAP extension, 495
implicit casting
operators, 39
type juggling, 39
implode function, 438
imploding strings, 94
import_request_variables function, 438
in_array function, 438
include statement, 57
indexed arrays, 119
info functions, 382
Informix extension, 496
Ingres II extension, 496
inheritance, 144, 150
INI entries, extensions, 354
ini_alter function, 439
ini_get function, 439
ini_get_all function, 439
ini_restore function, 439
ini_set function, 439
inline options, Perl-compatible regular expressions, 110
input, filtering, 285-290
INSERT statement (SQL), 198
installation, 7-9
on Windows, 359-363
integers, 25
hexadecimal numbers, 26
literals, 25
octal numbers, 26
InterBase extension, 496
interface_exists function, 440
interfaces, 150
internal extension globals, 351
interpolation, 74
intersection, array sets, 141
introspection, 153
sample program, 156-159
intval function, 440
ip2long function, 440
iptcparse function, 440
IRC Gateway extension, 496
is_a function, 440
is_array function, 440
is_bool function, 440
is_callable function, 441
is_dir function, 441
is_double function, 441
is_executable function, 441
is_file function, 441
is_finite function, 441
is_float function, 442
is_infinite function, 442
is_int function, 442
is_integer function, 442
is_link function, 442
is_long function, 442
is_nan function, 442
is_null function, 443
is_numeric function, 443
is_object function, 154, 443
is_readable function, 443
is_real function, 443
is_resource function, 31, 443
is_scalar function, 443
is_string function, 444
is_subclass_of function, 444
is_uploaded_file function, 444
is_writable function, 444
is_writeable function, 444
isset function, 444
iterator functions, arrays and, 129
J[ Top ]
Java extension, 496
join function, 444
K[ Top ]
key function, 129, 445
keys, arrays, 125
keywords, 24
krsort function, 445
ksort function, 445
L[ Top ]
last in first in stack (see LIFO stack)
lcg_value function, 445
LDAP extension, 496
levenshtein function, 445
libraries
code libraries, 302
libxslt, 278
libxslt C library, 278
LIFO (last-in first-in) stack, arrays, 141
line breaks, statements and, 19
link function, 445
linkinfo function, 446
list function, 446
literals, 25
load balancing, 319
local scope, 33
localeconv function, 446
localtime function, 447
log function, 447
log10 function, 447
log1p function, 448
logging in error handlers, 311
logging, functions, 378
logical operators, 45
long2zip function, 448
lookahead, Perl-compatible regular expressions, 111
lookbehind, Perl-compatible regular expressions, 111
loops, for loops, 130
lstat function, 448
ltrim function, 82, 448
M[ Top ]
macros, zval data type, 340-342
mail function, 448
mail, portable code and, 364
maintaining state, 185-195
MAKE_STD_ZVAL( ) macro, 339
matching
Perl-compatible regular expressions, 107
POSIX-style regular expressions, 103
math functions, 381
max function, 448
mcrypt extension, 497
MCVE extension, 497
md5 function, 449
md5_file function, 449
memory management, 35
extensions, 336-338
memory requirements, optimization, 318
merging arrays, 139
meta tags, extracting, 86
metadata, databases, 210
metaphone function, 449
method_exists function, 155, 449
methods, 144, 254
abstract, 151
accessing, 145-146
AliasNbPages( ), 254
declaring, 147
execute( ), 206
executeMultiple( ), 206
fetchInto( ), 203
fetchRow( ), 203
forms, 168
GET requests, 169
getListOf( ), 210
as handlers, parsing XML and, 272
header( ), 254
HTTP, 164
nextID( ), 210
POST requests, 169
prepare( ), 206
query( ), 202
mhash extension, 497
Microsoft SQL Server, 497
microtime function, 316, 449
min function, 449
Ming extension, 497
miscellaneous operators, 48
missing parameters, 71
mkdir function, 450
mktime function, 450
mnoGoSearch extension, 497
modulus operator (%), 40
money_format function, 450
move_uploaded_file function, 451
msession extension, 498
mSQL extension, 498
mt_getrandmax function, 451
mt_rand function, 451
mt_srand function, 451
multidimensional arrays, 123
multiplication operator (*), 40
multivalued parameters, 175
MySQL, 362, 498
replication, 319
N[ Top ]
names
classes, identifiers, 24
functions, identifiers, 23
variables, identifiers, 23
natcasesort function, 451
natsort function, 136, 452
negation operator (-), 40
networking functions, 381
newsgroup announcement, 2
next function, 129, 452
nextID( ) method, 210
nl_langinfo function, 452
nl2br function, 452
NNTP extension, 495
notices, errors, 309
NULL data type, 31
number_format function, 452
O[ Top ]
ob_clean function, 307, 453
ob_end_clean function, 453
ob_end_flash function, 453
ob_flush function, 307, 453
ob_get_clean function, 453
ob_get_contents function, 307, 454
ob_get_flush function, 454
ob_get_length function, 307, 454
ob_get_level function, 454
ob_gzhandler function, 308, 454
ob_implicit_flush function, 454
ob_list_handlers function, 455
ob_start function, 306, 455
Object Linking and Embedding (OLE), 366
object-oriented programming (see OOP)
objects, 30, 144
creating, 144
functions, 378
methods, 144
properties, 144
octal numbers, 26
octdec function, 455
ODBC data sources
Access, 374
DSN configuration, 372
ODBC extension, 498
OLE (Object Linking and Embedding), 366
OOP (object-oriented programming), 30
classes and, 30
opendir function, 455
openlog function, 455
openssl extension, 499
operators, 36
arithmetic, 40
assignment, 47
associativity, 38
autodecrement, 41
autoincrement, 41
bitwise, 43
casting, 45
comparison, 41
implicit casting, 39
logical, 45
miscellaneous, 48
operands, 38
operator precedence, 38
string concatenation, 40
Oracle extension, 499
ord function, 456
output buffering, 306-308
error handlers, 312
output compression, 308
output control functions, 381
output_add_rewrite_var function, 456
output_reset_rewrite_vars function, 457
OvrimosSQL extension, 499
P[ Top ]
pack function, 457
padding arrays, 122
parameter handling, 342
examples, 343-345
parameters, 63
callback, 306
forms and, 169
automatic quoting, 170
multivalued parameters, 175
stick multivalued parameters, 177
function parameters, 35
functions
default, 69
missing, 71
passing by reference, 68
passing by value, 68
variable, 70
parse errors, 309
parse_ini_file function, 458
parse_str function, 458
parse_url function, 97, 458
parsing XML, 264
character data handler, 266
default handler, 269
DOM and, 277
element handlers, 265
entity handlers, 267
errors, 271
methods as handlers, 272
processing instructions, 266
sample application, 272-277
SimpleXML and, 277
passing parameters
by reference, 68
by value, 68
passthru function, 458
pathinfo function, 459
pclose function, 459
PDFs
cells, 248
data, 258
documents, 246
example, 247
extensions, 246
images, 255
initializing, 247
tables, 258
text
attributes, 250
coordinates, 248
footers, 253
headers, 253
PEAR DB, 196, 199
DSN, 201
error checking, 202
protocols, 201
performance tuning, 313
benchmarking, 315
execution time, optimization, 317
load balancing, 319
memory requirements, optimization, 318
MySQL replication, 319
profiling, 316
reverse-proxy cache, 318
Perl-compatible regular expressions, 98
anchors, 107
backreferences, 109
character classes, 107
conditional, 113
cut, 112
delimiters, 106
functions, 113-117
inline options, 110
lookahead, 111
lookbehind, 111
matching, 107
non-capturing groups, 109
Perl regular expressions and, 118
quantifiers, 108
trailing options, 109
pfsockopen function, 459
PHP
embedding, in web pages, 59-62
evolution, announcement to newsgroup, 2
growth of, 6
history of, 2-6
PHP options/info functions, 382
php_ini_scanned_files function, 459
php_logo_guid function, 460
php_sapi_name function, 460
php_uname function, 460
phpcredits function, 460
phpinfo function, 10, 461
phpversion function, 461
pi function, 461
pixels, 227
placeholders in databases, 205
POP3 extension, 495
popen function, 461
portable code
end-of-line, 364
environment, 364
external commands, 365
mail and, 364
platform definition, 363
platform-specific extensions, 365
pos function, 462
POSIX expressions, 98
POSIX-style regular expressions
anchors, 103
character classes, 102
functions, 103
matching, 103
POST requests, 169
idempotence, 169
PostgreSQL extension, 499
pow function, 462
precedence of operators, 38
preg_grep function, 117
preg_match function, 113
preg_match_all function, 117
preg_quote function, 117
preg_replace function, 115
preg_split function, 117
prepare( ) method, 206
prev function, 129, 462
print function, 462
strings, 78
print_r function, 80, 462
printf function, 462
format specifiers, 79
strings, 78-80
type specifiers, 79
printing, strings
echo command, 78
print function, 78
print_r function, 80
printf function, 78-80
var_dump function, 80
processing forms
file uploads, 179
methods and, 168
parameters, 169
automatic quoting, 170
multivalued, 175
sticky multivalued, 177
self-processing pages, 172
sticky forms, 174
validation, 180-182
profiling, 316
properties, 144
accessing, 145-146
declaring, 148
protocols, 201
pspell extension, 500
putenv function, 463
pval data type, 338
Q[ Top ]
quantifiers
greedy, 108
regular expressions, 100
Perl-compatible, 108
queries, databases
issuing, 202
response details, 208
results, 203
row arrays, 204
rows, 203
query( ) method, 202
query-strings, encoding, 87
quoted_printable_decode function, 463
quotemeta function, 464
quoting parameters automatically, 170
R[ Top ]
rad2deg function, 464
rand function, 464
range function, 464
range of values, assigning to arrays, 122
range function, 122
rawurldecode function, 87, 464
rawurlencode function, 86, 464
RDBMS (Relational Database Management System), 198
readdir function, 465
readfile function, 465
Readline extension, 500
readlink function, 465
realpath function, 465
Recode extension, 500
redirection, response headers, 183
reducing arrays, 131
references, 349
passing parameters by, 68
variable, 32
register_globals option, 165
register_globals directive, security and, 296
register_shutdown_function function, 465
register_tick_function function, 466
registering variables, 189
regular expressions, 97
alternatives in, 100
character classes, 99
Perl-compatible, 98
delimiters, 106
POSIX, 98
quantifiers, 100
repeating sequences, 100
subpatterns, 101
Relational Database Management System (RDBMS), 198
Remote Procedure Call (see RPC)
rename function, 466
repeating sequences, regular expressions, 100
reporting errors, 309
reset function, 129, 466
resources, 30
extensions, 356
response headers
authentication, 184
content types, 183
expiration, 183
redirections, 183
setting, 182-185
responses to queries, details, 208
restore_error_handler function, 466
restore_exception_handler function, 466
restore_include_path function, 466
return statement, 57
return values, functions, 71
returning values, functions
arrays, 346
objects, 347
simple types, 345
reverse-proxy cache, 318
reversing arrays, 137
rewind function, 467
rewinddir function, 467
Rich Site Summary (see RSS)
rmdir function, 467
rot13.c. file, skeleton extension, 326-330
round function, 467
row arrays, queries, 204
RPC (Remote Procedure Call), 366
rsort function, 134, 467
RSS (Rich Site Summary), 263
rtrim function, 82, 468
S[ Top ]
scaling images, 239
Schema, XML, 262
scope
global, 34
local, 33
variables, 66
global, 67
static, 68
scripting
command-line, 1
embedding PHP and, 62
server-side, 1
searches
array values, 132
strings, 95
masks, 97
position, 96
Secure Sockets Layer (SSL), 195
security, 285
code, 299
escape output, 290-293
file access, 296-299
filenames and, 292
filtering input, 285-290
session fixation, 294
shell commands, 300
SQL injection and, 288
uploads
browser-supplied filenames, 295
filling filesystem, 295
register_globals, 296
XXS and, 293
SELECT statement (SQL), 199
self-processing pages, forms and, 172
semicolons, statements and, 19
SEPARATE_ZVAL( ) macro, 339
sequences, databases, 210
serialization, 159
serialize function, 160, 468
Server header, 165
servers, XML and, 281
server-side scripting, 1
session fixation, security, 294
session_destroy function, 190
session_start function, 190
session_unregister function, 190
sessions
cookies and, combining, 194
enabling, 190
state and, 189
set_error_handler function, 311, 468
set_exception_handler function, 468
set_file_buffer function, 469
set_include_path function, 469
set_magic_quotes_runtime function, 469
set_time_limit function, 469
setcookie function, 186, 469
setlocale function, 470
setrawcookie function, 470
sets, arrays, 140
union, 140
settype function, 470
SG (SAPI) Globals, 351
SGML, embedding PHP and, 61
sha1 function, 471
sha1_file function, 471
shell, 16
commands, security, 300
shell_exe function, 471
shell-style comments, 20
shmop extension, 500
shortcuts in databases, 207
show_source function, 471
shuffle function, 138, 471
similar_text function, 471
SimpleXML, parsing XML, 277
sin function, 471
single-quoted strings, 75
sinh function, 472
size of arrays, 122
sizeof function, 122, 472
skeleton extension, 325
rot13.c file, 326-330
sleep function, 472
slicing arrays, 124
SNMP extension, 500
socket_get_status function, 472
socket_set_blocking function, 472
socket_set_timeout function, 472
sockets extension, 501
sort function, 134, 473
sorting, arrays
ascending order, 134
descending order, 134
multiple at once, 136
natural order sort, 136
one at a time, 133
random order, 138
soundex function, 473
source code, downloading, 7, 322
split function, 105, 473
spliti function, 473
sprintf function, 473
SQL (Structured Query Language), 198
DELETE statement, 198
injection, security and, 288
INSERT statement, 198
SELECT statement, 199
strings and, slashes, 87
UPDATE statement, 199
sql_regcase function, 474
sqrt function, 474
srand function, 474
sscanf function, 95, 474
SSL (Secure Sockets Layer), 195
stacks, arrays, 141
standalone extensions, compiling, 330
stat function, 474
state
cookies and, 186-189
maintaining, 185-195
sessions and, 189
statements
declare, 56
exit, 57
flow-control, 49-57
for, 54
foreach, 56
If, 49-51
include, 57
line breaks, 19
return, 57
semicolons and, 19
switch, 51
while, 52
whitespace, 19
static variables, 34, 68
sticky forms, 174
storing cookies, 192-195
storing data in arrays, 120-123
str_ireplace function, 474
str_pad function, 475
str_repeat function, 475
str_replace function, 475
str_rot13 function, 475
str_shuffle function, 476
str_split function, 476
str_word_count function, 476
strcasecmp function, 476
strchr function, 476
strcmp function, 477
strcoll function, 477
strcspn function, 97, 477
strftime function, 477
strings, 27
Boolean values, 28
case, changing, 83
characters, 82
cleaning, 82
comparing
approximate equality, 90
exact, 89
concatenation operator, 40
C-string encoding, 88
decomposing
exploding, 94
imploding, 94
tokenizing, 94
entity-quoting HTML syntax characters, 84
entity-quoting special characters, 84
heredocs, 76
HTML tags, removing, 86
miscellaneous functions, 93
printing
echo command, 78
print function, 78
print_r function, 80
printf function, 78-80
var_dump function, 80
query-strings, encoding, 87
searches, 95
masks, 97
position, 96
single-quoted, 75
SQL and, slashes, 87
substrings, 91
whitespace, removing, 82
strip_tags function, 86, 479
stripcslashes function, 478
stripos function, 479
stripslashes function, 87, 478
stristr function, 479
strlen function, 82, 479
strnatcasecmp function, 479
strnatcmp function, 480
strncasecmp function, 480
strncmp function, 480
strpbrk function, 480
strpos function, 96, 480
strrchr function, 481
strrev function, 481
strripos function, 481
strrpos function, 481
strspn function, 97, 481
strstr function, 96, 481
strtok function, 482
strtolower function, 83, 482
strtotime function, 482
strtoupper function, 83, 482
strtr function, 483
Structured Query Language (see SQL)
strval function, 483
subclasses, 144
subpatterns, regular expressions, 101
substr function, 91, 483
substr_compare function, 483
substr_count function, 483
substr_replace function, 92
substrings, 91
subtraction operator (-), 40
sum of an array, 139
superclasses, 144
suppressing errors, 310
switch statement, 51
Sybase extension, 501
symbol table
memory management and, 35
reference count and, 35
symlink function, 484
syslog function, 484
system function, 484
System V Semaphore extension, 501
T[ Top ]
tables, PDFs, 258
tags, 262
tan function, 484
tanh function, 485
templating systems, 303-306
tempnam function, 485
testing extensions, 332
text
images and, 232
fonts, 233
TrueType fonts, 234
PDFs
attributes, 250
coordinates, 248
footers, 253
headers, 253
text representation of images, 244
tidy extension, 501
time function, 485
time_nanosleep function, 485
tmpfile function, 485
tokenizing strings, 94
touch function, 485
trailing options, Perl-compatible regular expressions, 109
transactions, databases, 210
trigger_error function, 310, 486
triggering errors, 310
trim function, 82, 486
true color
color indexes, 243
formats, 228
type juggling, 39
type specifiers, printf function, 79
U[ Top ]
uasort function, 486
ucfirst function, 486
ucwords function, 486
uksort function, 486
umask function, 487
Unicode data, XML, 269
uniqid function, 487
unlink function, 487
unpack function, 487
unparsed entities, XML, 267, 268
unregister_tick_function function, 487
unserialize function, 160, 487
unset function, 488
UPDATE statement (SQL), 199
uploads
forms and, 179
security
browser-supplied filenames, 295
filling filesystem, 295
register_globals, 296
urldecode function, 87, 488
urlencode function, 87, 488
URLs
decoding, 86
decomposing, 97
encoding, 86
user_error function, 488
User-Agent header, 165
usleep function, 488
usort function, 134, 488
V[ Top ]
validating forms, 180-182
values
arrays
multiple values, 123
ranges, assigning, 122
searches, 132
function return values, 71
passing parameters by, 68
returning from functions
arrays, 346
objects, 347
simple types, 345
var_dump function, 80, 489
var_export function, 489
variable functions, 72
variable interpolation, 74
double-quoted strings, 76
variable scope, 66
variables, 32
creating, 353
from arrays, 127
creating arrays from, 128
declaring, 32
function parameters, 35
global, 67
names, identifiers, 23
parameters, 70
references, 32
registration, 189
scope
global, 34, 67
local, 33
static, 68
static, 34, 68
variable, 32
web, 165
Verisign Payflow Pro extension, 499
version_compare function, 489
vprintf function, 489
vsprintf function, 489
W[ Top ]
warnings, errors, 309
WDDX extension, 501
web services, XML and, 280
while statement, 52
whitespace
statements and, 19
strings, removing from, 82
Windows
PHP configuration, 359-363
PHP installation, 359-363
Word documents, COM, 368-371
wordwrap function, 489
X[ Top ]
XML (Extemsible Markup Language), 261
case folder, 270
character encoding, 269
clients, 283
documents
ad hoc, 262
DTD, 262
Schema, 262
dynamic, RSS, 263
elements, 261
embedding PHP and, 59
entities
external, 267
unparsed, 268
entity handlers, 267
generating, 263
parser creation, 270
parsing, 264
character data handler, 266
default handler, 269
DOM and, 277
element handlers, 265
entity handlers, 267
errors, 271
methods as handlers, 272
processing instructions, 266
sample application, 272-277
SimpleXML and, 277
processing instructions, 262
servers and, 281
Unicode data, 269
web services and, 280
well-formed documents, 262
XML Parser extension, 501
xml_get_error_code function, 271
xml_parse function, 271
xml_parser_create function, 270
xml_set_character_data_handler function, 266
xml_set_default_handler function, 269
xml_set_element_handler function, 265
xml_set_processing_instruction_handler function, 266
XSLT (Extensible Stylesheet Language Transformations), 278-280
XXS (cross-site scripting), security and, 293
Y[ Top ]
YAZ extension, 502
YP/NIS extension, 502
Z[ Top ]
zend_logo_guid function, 490
zend_version function, 490
zlib compression extension, 502
zval data type, 338
MAKE_STD_ZVAL( ) macro, 339
SEPARATE_ZVAL( ) macro, 339
zval_copy_ctor function, 340
zval_copy_ctor function, 340
Zurück zu Programming PHP