News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
PHP 5 and Polymorphism
March 07, 2006 @ 07:19:08

From DevShed, there's a more advanced tutorial that might interest PHP developers out there looking for more info on "polymorphism" for their apps.

This article explains what polymorphism is and how it applies to object oriented design in particular. It also explains the pros and cons of polymorphism when working with certain versions of PHP.

They start with a definition on the topic that doesn't seem to help much: "The occurrence of different forms, stages, or types in individual organisms or in organisms of the same species, independent of sexual variations." They do, however, follow that with what it means to programming: "...an interface or base class without regard to an object's concrete class." They also include a simple example (no code, that's later).

With that concept in place, they move to the next step - working with the example to create code that can be used as a reference point. They talk about using a switch to make the script respond differently to different inputs and the lack of "late binding" support in PHP5.

0 comments voice your opinion now!
php5 polymorphism late binding switch php5 polymorphism late binding switch


blog comments powered by Disqus

Similar Posts

Matthew Turland's Blog: PHP 5.2 and SQL Server 2000 on Windows XP

PHPBuilder.com: What\'s new in PHP 5 and PHP 6

JellyandCustard.com: Using DirectoryIterator to List Files in PHP

Job Posting: Open Source Staffing Seeks a PHP5 Developer (New York, NY)

DevShed: Validating Incoming Data by Using Polymorphism with Objects in PHP 5


Community Events





Don't see your event here?
Let us know!


api symfony tips release list voicesoftheelephpant library community series package interview install laravel podcast deployment language bugfix framework introduction opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework