Core PHP Programming: A New Perspective on Object-Oriented Design

Core PHP Programming: A New Perspective on Object-Oriented Design

by Leon Atkinson
     
 
Foreword by Andi Gutmans

The experienced developer's guide to PHP!

Master PHP 4, the open source, high-performance, cross-platform solution for server-side scripting!

Core PHP Programming, Second Edition is the #1 practical guide to PHP 4 for Web developers. With the guidance of top PHP developer Leon Atkinson, you'll learn everything you

Overview

Foreword by Andi Gutmans

The experienced developer's guide to PHP!

Master PHP 4, the open source, high-performance, cross-platform solution for server-side scripting!

Core PHP Programming, Second Edition is the #1 practical guide to PHP 4 for Web developers. With the guidance of top PHP developer Leon Atkinson, you'll learn everything you'll need to build robust, fast Web applications — and deploy them on leading Web servers, from Apache to Microsoft Internet Information Server.

Atkinson covers PHP syntax, the key building blocks of PHP scripts, and every PHP function, including I/O, data, and math functions, time, date, configuration, database, graphics, and network functions. He presents PHP at work in sample code that demonstrates sorting, searching, parsing, string evaluation, and more. You'll even find detailed, real-world insights into PHP 4 program design and debugging!

Core PHP Programming delivers

  • Thorough, easy-to-understand coverage of PHP syntax and functions
  • Step-by-step guidance for PHP database integration
  • Design and optimization techniques for maximum performance and extensibility
  • Practical debugging solutions
CD-ROM includes PHP 4 source code and Windows binaries plus all the code examples from the book!

Editorial Reviews

Booknews
A book/CD-ROM guide to PHP 4 for Web developers, covering essentials for building Web applications and deploying them on leading Web servers, including Apache and Microsoft Internet Information Server. Covers PHP syntax, PHP scripts, and I/O, data, and math functions, and time, date, configuration, database, graphics, and network functions. Presents PHP at work in sample code that demonstrates sorting, searching, parsing, and string evaluation. Also gives insights into PHP 4 program design and debugging. The CD-ROM contains source code and code examples. Atkinson is creator of an e-commerce toolkit. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Product Details

ISBN-13:
9780130893987
Publisher:
Pearson Education
Publication date:
08/04/2000
Series:
Core Series
Edition description:
Older Edition
Pages:
769
Product dimensions:
7.02(w) x 9.32(h) x 2.16(d)

Read an Excerpt

Chapter 1: An Introduction to PHP

This chapter will introduce you to PHP. You will learn how it came about, what it looks like, and why it is the best server-side technology. You will also be exposed to the most important features of the language.

PHP began as a simple macro replacement tool. Like a nice pair of shoes, it got you where you needed to go, but you could go only so far. On the hyperspeed development track of the Internet, PHP leas become the equivalent of a 1960s muscle, car. It's cheap, it's fast, and there's plenty of room under the hood for you and your virtual wrench.

You probably don't need convincing that whether it's Internet, intranet, or extranet, the Web is no longer about plain HTML files. Web pages arc being replaced with Web applications. The issue many Web engineers face is choosing among hundreds of technologies.

This chapter will let you poke around the PHP engine., get your hands a little dirty, and take it for a spin. There are lots of small examples you can try immediately. Like all the examples in this book, you can easily adapt them to provide real solutions. Don't be intimidated if you don't fully understand the. PHP code at first. Later chapters will deal with all the issues in detail. This chapter talks about some things that you already know, like what a computer is, just to make sure we're all on the same page. You may be a wizzard with HTML, but not fully appreciate the alien way computers arc put together. Or you tray find you learned all these things in a high school computer class. If you get too. bored with the basics, skip to Chapter 2, " Variables, Operators, and Expressions."

The Origins of PPP

Wonderful things come from singular inspiration. PPP began life as a simple way to track visitors to Rasmus Lerdorfs online resume. It also could embed SQL queries in Web pages. But as often happens on the Web, admirers quickly asked for their own copies. As a proponent of the Internet's ethic of sharing, as well as a generally agreeable person, Rasmus unleashed upon an unsuspecting Web his Personal Home Page Tools version 1.0.

"Unleashed upon himself" may be more accurate. PPP became very popular. A consequence was a flood of suggestions. PPP 1.0 filtered input, replacing simple commands for HTML. As its popularity grew, people wondered if it couldn't do more. Loops, conditionals, rich data structures-all the conveniences of modern structured programming seemed like a next logical step. Rasmus studied language parsers, read about YACC and GNU Bison, and created PPP 2.0.

PPP 2.0 allowed developers to embed structured code inside. HTML tags. PPP scripts could parse data submitted by HTML forms, communicate with databases, and make complex calculations on the fly. And it was very fast, because the freely available source code compiled into the Apache Web server. A PPP script executed as part of the Web server process and required no forking, often a criticism of Common Gateway Interface (CGI) scripts.

PPP was a legitimate development solution and began to be, used for commercial Web sites. In 1996 Clear Ink created the SuperCuts site (www. supercuts.corn) and used PPP to created a custom experience for the Web surfer. In January of 1999 the PPP Web site reported almost 100,000 Web servers were using PPP By November that figure lead climbed higher than 350,000 A community of developers grew up around PHP Feature requests were balanced by bug fixes and enhancements Zeev Suraski and Audi Gutmaris made a significant contribution by writing a new parser. They observed that the parser in PHP 2.0 was the source of many problems. Rasmus decided to begin work on PPP 3.0 and called for developers to commit to its creation. Along with Zeev and Audi, three others lent their support: Stig Bakken, Shane Caraveo, and Jim Winstead....

Meet the Author

Leon Atkinson is Chief Technologist for Clear Ink Corporation, an agency offering traditional and Web communication services. He is creator and maintainer of the FreeTrade project, an Open Source e-commerce toolkit, and an enthusiastic supporter of PHP.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >