Why Learn PHP5?
We assume if you are reading this article that you have been convinced to learn PHP. Perhaps you are new to PHP or perhaps you are already experienced with PHP4. Now the question is why should you do PHP5? After all, PHP4 is quite good. Yes, but depending on what you are doing PHP5 can be better, much better. Just a simple reminder, we feel that most people who are new to programming should start with PHP4. Most people learn to walk before they learn to skate. But many great hockey players learned to ice skate before they learned to walk.
Object-oriented programming is the way to go when you want to develop sophisticated applications. Many purists say that people serious about programming should start with object-oriented programming right from the beginning. Don’t get me wrong. PHP4 provides many aspects of object-oriented programming. But it is missing many other aspects. The following is a partial list of functionality missing in PHP4 but available in PHP5. (This is not the place to explain these functions, don’t worry if you don’t know what they mean until you are ready to start using them.) PHP5 enables you to work with destructors, private and protected member variables and functions, static member variables and functions, interfaces, class type hints, abstract classes and methods, object iteration, and more. If that sounds like a lot to learn, it is. But if you need any or all of this functionality you will swear by PHP5. And swear at PHP4. If this is what you need don’t look for workarounds, download PHP5. By the way, PHP5 doesn’t only increase object-oriented functionality. Because of better internal management PHP5 actually works faster than PHP4 or the Microsoft alternatives, whether or not you are using this new functionality.
A book can help you learn PHP5, but only if your computer is on.
The world wide web is really world-wide. Yes, and many parts of the world don’t rely on our 26-letter alphabet. PHP5 supports non-Western character sets and Unicode so that you can develop web pages for the whole wide world.
If you use XML instead of HTML you should move to PHP5 for a variety of technical reasons. Many sections of PHP5 were rewritten to extend, improve, and simplify using XML. Additional reasons for moving to PHP5 include dozens of new functions and improved MySQL support. On the downside, PHP5 is not supported on Windows 95. Considering that Microsoft no longer supports Windows 95 we should not be too surprised. But you can run PHP5 on old computers. I have run PHP5 programs under Windows 2000 on a computer purchased new in August, 1999. And the entire PHP environment required less than 100 Megabytes.