Thursday, September 18, 2008

Abstract Classes in PHP: Working with PHP 5

http://www.devshed.com/c/a/PHP/Abstract-Classes-in-PHP-Working-with-PHP-5/

Because of the numerous improvements introduced in its Object Model, PHP 5 makes it much easier to work with abstract classes. The process is as simple as preceding the “class” keyword with the term “abstract” and following certain prerequisites that should be met (more about this in a moment). Of course, as with PHP 4, abstract classes in PHP 5 cannot be instantiated, and any attempt to instantiate them will result in a fatal error triggered by the PHP interpreter.