Article

Home » Server-side Coding » PHP & MySQL Reviews and Apps » PHP5: Coming Soon to a Webserver Near You

About the Author

Harry Fuecks

author_HarryF Harry has been working in corporate IT since 1994, with everything from start-ups to Fortune 100 companies. Outside of office hours he runs phpPatterns: a site dedicated to software design with PHP that aims to raise standards of PHP development. He also maintains Dynamically Typed: SitePoint's PHP blog.

View all articles by Harry Fuecks...

PHP5: Coming Soon to a Webserver Near You

By Harry Fuecks

July 28th, 2003

Reader Rating: 9.5

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Next

If you have more than a little to do with PHP, the Internet’s most popular server side programming language, you'll no doubt be aware that the successor to the current PHP version 4 is waiting in the wings.

Over the past couple of years, PHP5 has been a murmur on the fringes on PHP discussions, often surfacing in discussions of PHP4's Object Model (the support PHP provides for Object Oriented Programming).

For some, PHP5 is the "holy grail" that will deliver essential features they've been struggling to survive without. For others, PHP5 is vaguely unsettling, as it appears to threaten the status quo with suggestions of its adoption of a Java-like programming discipline.

Whatever your take on the situation (or if you weren't even aware of it), the hour of PHP5 is fast approaching. On 29th June, 2003 Sterling Hughes announced PHP5 Beta 1, the first release intended to give the PHP community as a whole a taste of what's coming.

I've been watching PHP5's evolution from the sidelines and mailing lists, trying to avoid getting distracted from real work with PHP4, but with the Beta 1 announcement, my curiosity finally got the better of me. In this article I'll be giving you a fairly in depth tour of the important features PHP5 delivers, based on the Beta release. We’ll also consider its significance for the future of PHP as a technology.

Up front, I can already say (for anyone who’s nervous about the impact of version 5 on their ability to hack with PHP), don't panic! The core PHP development team is well aware of PHP's greatest strengths including rapid prototyping, its ease of use, and down to earth approach to problem solving. In developing version 5 it's clear these principles remained the team’s top priority, despite the fact that the driving force was to make PHP more attractive to professional software developers.

Today we’ll talk about:

  • Why PHP5?
  • Test Drive: The new object model, a new database, exception handling, new XML engine, and more...
  • Making Waves: the future with PHP

Important Note: PHP5 Beta 1 should not be used on a live Web server; there are still many issues to resolve. The beta release is intended for developers to get a feel for what's on offer, and help the PHP group with bug hunting.

Why PHP5?

Everyone loves PHP, right? Well everyone who uses it perhaps, but PHP4 has a number of areas which attract criticism from developers used to languages like Java. A large number of these criticisms result from PHP's history; PHP began life as a rudimentary procedural programming language.

Procedural Vs. Object Oriented

A procedural programming language is one in which the developer writes a list of instructions for a computer to follow in a "batch". The focus of a procedural language is the function, which is given priority over data (variables). Procedural programming is often very effective for one-off, "throw away" problem solving, such as a command line script to help backup a database, or a simple Web page with a form. The downside of procedural programming makes itself apparent when you start to build larger, more complex applications. Variables, being available from all areas, can easily be overwritten by mistake, and the general structure of the application typically leads to routines being reproduced, which results in big headaches when the inevitable—change—occurs.

One widely accepted alternative approach is the Object Oriented paradigm, which takes the view that data (or variables) has first priority, and should be carefully protected, while functions "back" the data with routines that handle their input and output. OOP leads to a different approach to application design, as, under this paradigm, developers are more concerned with what goes in and what comes out, than they are with the specific flow of a batch of procedures. OOP has proven a successful approach to dealing with change, helping developers to "abstract out" the elements of an application that are likely to vary, compiling them into well defined units that can be easily maintained.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links