A Programmer's Introduction to PHP 4.0

( 1 )

Overview

No matter what language you are familiar with, this book will benefit you. Beginning with a rapid introduction to PHP's syntax and basic functionality, you will swiftly understand PHP. The book then steers you toward advanced issues, like PHP's role in database manipulation, sessions, and user interactivity.

Author W. J. Gilmore also examines how PHP can work with XML, JavaScript, and the Component Object Model (COM). He loads the book with practical examples and several ...

See more details below
Paperback
$31.22
BN.com price
(Save 10%)$34.95 List Price
Other sellers (Paperback)
  • All (17) from $3.08   
  • New (6) from $22.14   
  • Used (11) from $3.08   
Sending request ...

Overview

No matter what language you are familiar with, this book will benefit you. Beginning with a rapid introduction to PHP's syntax and basic functionality, you will swiftly understand PHP. The book then steers you toward advanced issues, like PHP's role in database manipulation, sessions, and user interactivity.

Author W. J. Gilmore also examines how PHP can work with XML, JavaScript, and the Component Object Model (COM). He loads the book with practical examples and several projects that can be immediately incorporated on any website. The invaluable A Programmer's Introduction to PHP 4.0 shows you how to make the most of PHP's powerful capabilities, regardless of your current scope of PHP knowledge.

Read More Show Less

Product Details

  • ISBN-13: 9781893115859
  • Publisher: Apress
  • Publication date: 1/10/2001
  • Edition number: 1
  • Pages: 453
  • Product dimensions: 0.97 (w) x 9.25 (h) x 7.50 (d)

Meet the Author

W. Jason Gilmore is a web developer and business consultant with more than 15 years of experience helping companies large and small build amazing software solutions. He has been teaching developers from around the world about web development for over a decade, having written six books, including the bestselling "Beginning PHP and MySQL, Fourth Edition" and "Easy PHP Websites with the Zend Framework, Second Edition".

Over the years Jason has been published more than 300 times within popular publications such as Developer.com, PHPBuilder.com, JSMag, and Linux Magazine, and instructed hundreds of students in the United States and Europe. He's recently led the successful development and deployment of a 10,000+ product e-commerce project, and is currently working on a variety of new e-commerce initiatives. Jason is cofounder of the wildly popular CodeMash Conference, the largest multi-day developer event in the Midwest.

Read More Show Less

Read an Excerpt

Chapter 1: An Introduction to PHP

The past five years have been fantastic in terms of the explosive growth of the Internet and the new ways in which people are able to communicate with one another. Spearheading this phenomenon has been the World Wide Web (WWW), with thousands of new sites being launched daily and consumers being consistently offered numerous outstanding services via this new communications medium. With this exploding market has come a great need for new technologies and developers to learn these technologies. Chances are that if you are reading this paragraph, you are one of these Web developers or are soon to become one. Regardless of your profession, you've picked this book up because you've heard of the great new technology called PHP.

This chapter introduces the PHP language, discusses its history and capabilities, and provides the basic information you need to begin developing PHPenabled sites. Several examples are provided throughout, hopefully serving to excite you about what PHP can offer you and your organization. You will learn how to install and configure the PHP software on both Linux/ UNTX and Windows machines, and you will learn how to embed PHP in HTML. At the conclusion of the chapter, you will be ready to begin delving into the many important aspects of the PHP language. So light the fire, turn on your favorite jazz album, and curl up on the lazyboy; you are about to learn what will be one of the most exciting additions to your resume: PHP programming.

An Abbreviated History

PHP set its roots in 1995, when an independent software development contractor named Rasmus Lerdorf developed a Perl/CGI script that enabled him toknow how many visitors were reading his online resume. His script performed two duties: logging visitor information and displaying the count of visitors to the Web page. Because the WWW as we know it today was still so young at that time, tools such as these were nonexistent, and they prompted emails inquiring about Lerdorf's scripts. Lerdorf thus began giving away his toolset, dubbed Personal Home Page (PHP), or Hypertext Preprocessor.

The clamor for the PHP toolset prompted Lerdorf to begin developing additions to PHl, one of which converted data entered in an HTML form into symbolic variables that allowed for their export to other systems. To accomplish this, he opted to continue development in C code rather than Perl. This addition to the existing PHP toolset resulted in PHP 2.0, or PHP-FI (Personal Home Page-Form Interpreter). This 2.0 release was accompanied by a number of enhancements and improvements from programmers worldwide.

The new PHP release was extremely popular, and a core team of developers soon formed. They kept the original concept of incorporating code directly alongside HTML and rewrote the parsing engine, giving birth to PHP 3.0. By the 1997 release of version 3.0, over 50,000 users were using PHP to enhance their Web pages.

NOTE 1997 also saw the change of the words underlying the PHP abbrevi- ation from Personal Home Page to Hypertext Preprocessor.

Development continued at a hectic pace over the next two years, with hundreds of functions being added and the user count growing in leaps and bounds. At the onset of 1999, Netcraft (http: //www. netcraft. com) reported a conservative estimate of a user base surpassing 1,000,000, making PHP one of the most popular scripting languages in the world.

Early 1999 saw the announcement of the upcoming PHP 4.0. Although one of PHP's strongest features was its proficiency at executing scripts, the developers had not intended that large-scale applications were going to be built using PHP Thus they set out to build an even-more robust parsing engine, better known as Zend (http : //www. zend. com). Development continued rapidly, culminating in the Map _ 22, 2000, release of PHP 4.0.

In addition to the Zend processor, Zend technologies, based in Israel, offers the Zend optimizer, which increases even further the performance benefits of the Zend parsing engine. Available for download free of charge, the benchmarks have shown that the optimizer can result in a 40 to 100 percent overall performance gain. Check out the Zend site for more information. At the time of this writing, according to Netcraft (http: //www. netcraft. com), PHP is installed on over 3.6 million domains, making it one of the most popular scripting languages in the world. The future of PHP indeed looks bright, as major Web sites and personal users alike continue to embrace the product.

PHP is best summarized as an embedded server-side Web-scripting language that provides developers with the capability to quickly and efficiently build dynamic Web applications. PHP bears a close resemblance, both syntactically and grammatically, to the C programming language, although developers haven't been shy to integrate features from a multitude of languages, including Perl, Java, and C++. Several of these valuable borrowed features include regular expression parsing, powerful array-handling capabilities, an object-oriented methodology, and vast database support.

For writing applications that extend beyond the traditional, static methodology of Web page development (that is, HTML), PHP can also serve as a valuable tool for creating and managing dynamic content, embedded directly beside the likes of JavaScript, Stylesheets, WML (Wireless Markup Language) and many other useful languages. Providing hundreds of predefined functions, PHP is capable of handling just about anything a developer can dream of. Extensive support is offered for graphic creation and manipulation, mathematical calculations, ecommerce, and burgeoning technologies such as Extensible Markup Language (XML), open database connectivity (ODBC), and Macromedia Shockwave. This vast range of capabilities eliminates the need for the tedious and costly integration of several third-party modules, making PHP the tool of choice for developers worldwide.

One of the main strengths of PHP is the fact that because it can be embedded directly alongside HTML code, there is no need to write a program that has many commands just to output the HTML. HTML and PHP can be used interchangeably as needed, working alongside one another in unison. With PHP, we can simply do the following:

And Hello world! will be displayed in the Web page title bar. Interestingly, the single line print statement is enclosed in what are commonly known as PHP's escape characters ( ) is a complete program. No need for lengthy prefacing code or inclusion of libraries; the only required code is what is needed to get the job done!

Of course, in order to execute a PHP script, you must first install and configure the PHP software on your server. This process is explained in "Downloading and Installing PHP/Apache," later in this chapter. Immediately preceding that section are a few excerpts from prominent users testifying to the power of PHI? followed by a detailed synopsis of the language and its history. However, before diving into the installation process, take a moment to read more about the characteristics of PHP that make it such a powerful language. This is the subject of the next section, aptly titled "Characteristics of PHP"

Characteristics of PHP

As you may have realized, the PHP language revolves around the central theme of practicality. PHP is about providing the programmer with the necessary tools to get the job done in a quick and efficient fashion. Five important characteristics make PHP's practical nature possible:

  • Familiarity
  • Simplicity
Read More Show Less

Table of Contents

The Basics.- Introduction to PHP.- Variables and Data Types.- Expressions.- Operators and Control Structures.- Functions.- Arrays.- Object Oriented PHP.- Advanced OOP.- File I/O.- Regular Expressions.- Web Application Development.- URL Manipulation.- Forms.- Databasing.- Templates.- Session Tracking and User Personalization.- Advanced Web Development.- Wireless PHP.- Advanced PHP.- XML.- Java and COM Integration.- Security Issues.
Read More Show Less

Customer Reviews

Average Rating 4
( 1 )
Rating Distribution

5 Star

(0)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted January 9, 2001

    Great book, very helpful.

    I read several of Mr. Gilmore's PHP articles, and thought they were useful that I purchased his book. Great reference, easy for beginner's (like me) to follow. It also provides some advanced stuff in the later chapters that is pretty useful.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)