Tải bản đầy đủ (.pdf) (278 trang)

Tài liệu Zend PHP 5 Certification Study Guide - By Davey Shafik with Ben Ramsey docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.92 MB, 278 trang )

.571
7.50 x 9.25
7.50 x 9.25
php|architect’s
ZEND PHP 5
Certification

STUDY GUIDE
Davey Shafik
with Ben Ramsey
US $32.99
Canada $42.99
UK (net) £19.99
From the publishers of
Shelve under PHP/Web Development/Internet Programming
php|architect’s Zend PHP 5 Certification Guide
D. Shafik / B. Ramsey
php|architect’s
Zend PHP 5 Certification
Study Guide
Zend's new PHP 5 Certification Exam represent an excellent tool for professional
PHP developers who want to distinguish themselves in their field.
php|architect's Zend PHP 5 Certification Study Guide, edited and produced by
the publishers of php|architect magazine, provides the most comprehensive and
thorough preparation tool for developers who wish to take the exam.
This book provides complete coverage of every topic that is part of the exam,
including:
✔ PHP Basics
✔ Functions
✔ Arrays
✔ Strings and Patterns


✔ Web Programming
✔ Object Oriented Programming
✔ Database Programming
✔ Object-oriented Design
✔ XML and Web Services
✔ Security
✔ Streams and Network Programming
✔ Differences Between PHP 4 and 5
Written by PHP professionals and Zend Certified PHP 5 Engineers Davey Shafik and
Ben Ramsey, and reviewed by core PHP developer Derick Rethans, this is the perfect
book for every prospective Zend Certified PHP Engineer candidate!
php|architect’s
Zend PHP 5 Certification
Study Guide
by Davey Shafik
with Ben Ramsey
php|architect’s Zend PHP 5 Certification Guide
Contents Copyright ©2006 David Shafik and Ben Ramsey – All Rights Reserved
Book and cover layout, design and text Copyright ©2004-2006 Marco Tabini & Associates, Inc. – All Rights Reserved
First Edition: October 2006
ISBN: 0-9738621-4-9
Produced in Canada
Printed in the United States
No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or
by means without the prior written permission of the publisher, excet in the case of brief quotations
embedded in critical reviews or articles.
Disclaimer
Although every effort has been made in the preparation of this book to ensure the accuracy of the
information contained therein, this book is provided “as-is” and the publisher, the author(s), their dis-
tributors and retailers, as well as all affiliated, related or subsidiary parties take no responsibility for any

inaccuracy and any and all damages caused, either directly or indirectly, by the use of such informa-
tion. We have endeavoured to properly provide trademark information on all companies and products
mentioned in the book by the appropriate use of capitals. However, we cannot guarantee the accuracy
of such information.
Marco Tabini & Associates, The MTA logo, php|architect, the php|architect logo, NanoBook and the
NanoBook logo are trademarks or registered trademarks of Marco Tabini & Associates, Inc.
Written by Davey Shafik
Ben Ramsey
Published by Marco Tabini & Associates, Inc.
28 Bombay Ave.
Toronto, ON M3H 1B7
Canada
(416) 630-6202 / (877) 630-6202
/ www.phparch.com
Edited by Sean Coates
Technical Reviewers Derick Rethans
Paul Reinheimer
Layout and Design Arbi Arzoumani
Managing Editor Emanuela Corso


Contents
Foreword xv
How To Use This Book xvii
Chapter 1 — PHP Basics 3
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Source Files and PHP Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Newline Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Anatomy of a PHP Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Code Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Language Constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Numeric Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Booleans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Compound Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Other Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Converting Between Data Types . . . . . . . . . . . . . . . . . . . . . . . 11
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Variable Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Determining If a Variable Exists . . . . . . . . . . . . . . . . . . . . . . . . 14
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
vi ” CONTENTS
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The String Concatenation Operator . . . . . . . . . . . . . . . . . . . . . 17
Bitwise Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Referencing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Other Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Operator Precedence and Associativity . . . . . . . . . . . . . . . . . . . 25
Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Conditional Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Iterative Constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Breaking and Continuing . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Errors and Error Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Types of Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Error Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Handling Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Chapter 2 — Functions 37
Basic Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Returning Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Variable Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Passing Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Variable-length Argument Lists . . . . . . . . . . . . . . . . . . . . . . . . 42
Passing Arguments by Reference . . . . . . . . . . . . . . . . . . . . . . . 43
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Chapter 3 — Arrays 47
Array Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Printing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Enumerative vs. Associative . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Multi-dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Unravelling Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
CONTENTS ” vii
Array Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Comparing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Counting, Searching and Deleting Elements . . . . . . . . . . . . . . . . 53
Flipping and Reversing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Array Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
The Array Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
An Easier Way to Iterate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Passive Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Sorting Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Other Sorting Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
The Anti-Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Arrays as Stacks, Queues and Sets . . . . . . . . . . . . . . . . . . . . . . . . . 67
Set Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Chapter 4 — Strings And Patterns 73
String Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Variable Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
The Heredoc Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Escaping Literal Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Determining the Length of a String . . . . . . . . . . . . . . . . . . . . . . 76
Transforming a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Using Strings as Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Comparing, Searching and Replacing Strings . . . . . . . . . . . . . . . . . . . 78
Simple Searching Functionality . . . . . . . . . . . . . . . . . . . . . . . . 79
Matching Against a Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Simple Search and Replace Operations . . . . . . . . . . . . . . . . . . . 81
Extracting Substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Formatting Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Formatting Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Formatting Currency Values . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Generic Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Parsing Formatted Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Perl-compatible Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . 89
viii ” CONTENTS
Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Metacharacters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Sub-Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Matching and Extracting Strings . . . . . . . . . . . . . . . . . . . . . . . 92
Using PCRE to Replace Strings . . . . . . . . . . . . . . . . . . . . . . . . 94
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Chapter 5 — Web Programming 97
Anatomy of a Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Forms and URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
GET and URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Using POST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
When You Don’t Know How Data Is Sent . . . . . . . . . . . . . . . . . . 101
Managing File Uploads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
GET or POST? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
HTTP Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Chapter 6 — Object Oriented Programming in PHP 113
OOP Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Declaring a Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Instantiating an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Class Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Class Methods and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Declaring and Accessing Properties . . . . . . . . . . . . . . . . . . . . . 122
Constants, Static Methods and Properties . . . . . . . . . . . . . . . . . . . . . 123
CONTENTS ” ix
Class Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Interfaces & Abstract Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Determining An Object’s Class . . . . . . . . . . . . . . . . . . . . . . . . 128
Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
The Basic Exception Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Throwing Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Lazy Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Reflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Chapter 7 — Database Programming 141
An Introduction to Relational Databases and SQL . . . . . . . . . . . . . . . . 141
Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
SQL Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Creating Databases and Tables . . . . . . . . . . . . . . . . . . . . . . . . 145
Creating Indices and Relationships . . . . . . . . . . . . . . . . . . . . . 146
Dropping Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Adding and Manipulating Data . . . . . . . . . . . . . . . . . . . . . . . . 148
Removing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
SQL Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Outer Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Advanced Database Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Prepared Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Chapter 8 — Elements of Object-oriented Design 157
Design Pattern Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The Singleton Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
The Factory Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
The Registry Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
The Model-View-Controller Pattern . . . . . . . . . . . . . . . . . . . . . 161

x ” CONTENTS
The ActiveRecord Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
The Standard PHP Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Accessing Objects as Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Simple Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Seekable Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Recursive Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Filtering Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Chapter 9 — XML and Web Services 171
The Extensible Markup Language (XML) . . . . . . . . . . . . . . . . . . . . . 172
Creating an XML Document . . . . . . . . . . . . . . . . . . . . . . . . . . 174
SimpleXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Parsing XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Accessing Children and Attributes . . . . . . . . . . . . . . . . . . . . . . 178
XPath Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Modifying XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Working With Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . 182
DOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Loading and Saving XML Documents . . . . . . . . . . . . . . . . . . . . 184
XPath Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Modifying XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Moving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Modifying Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Removing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Working With Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Interfacing with SimpleXML . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
SOAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Accessing SOAP-based Web Services . . . . . . . . . . . . . . . . . . . . . 193

Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Creating SOAP-based Web Services . . . . . . . . . . . . . . . . . . . . . 195
REST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
CONTENTS ” xi
Chapter 10 — Security 201
Concepts and Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
All Input Is Tainted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Whitelist vs. Blacklist Filtering . . . . . . . . . . . . . . . . . . . . . . . . 202
Filter Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Escape Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Register Globals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Website Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Spoofed Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Cross-Site Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Cross-Site Request Forgeries . . . . . . . . . . . . . . . . . . . . . . . . . 211
Database Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Session Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Filesystem Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Remote Code Injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Command Injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Shared Hosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Chapter 11 — Streams and Network Programming 223
Accessing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Common C-like File Functions . . . . . . . . . . . . . . . . . . . . . . . . 227
Simple File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Working with Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Controlling File Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Accessing Network Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

Simple Network Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Stream Contexts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Advanced Stream Functionality . . . . . . . . . . . . . . . . . . . . . . . . 234
Stream Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Appendix A — Differences Between PHP 4 and 5 239
Language Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
xii ” CONTENTS
Magic Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Selected New Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Error Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Index 245

×