News Feed
Sections




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

PHPBuilder.com:
Implementing User Defined Interfaces in PHP 5
August 16, 2012 @ 08:35:53

On PHPBuilder.com today there's a new tutorial that talks about creating interfaces in PHP and how to use them to effectively structure your application.

Starting with PHP 5 the object model was rewritten to add features and bring PHP in line with languages such as Java and Visual Basic .NET. In this article I'll discuss interfaces, which is among the most important features in PHP 5. Other important features include abstract and final classes, methods and additional magic methods. You will learn how to define your own interfaces and how to work with them using different object model mechanisms.

The introduce you to some of the basic concepts behind using interfaces and how to create a basic one - a simple definition of a string class with one method, "getString". They then show how to extend a different example (a RandomNumber interface) and add on an additional method. He also shows how to extend multiple interfaces and integrate functionality from multiple sources, overloading and overrides.

0 comments voice your opinion now!
user defined interface php5 tutorial extend implement


blog comments powered by Disqus

Similar Posts

DevShed: Comparing Files and Databases with PHP Benchmarking Applications

Zend Developer Zone: Tracing PHP Applications with xdebug

Brian Swan's Blog: SQL Server Driver for PHP Connection Options: Snapshot Isolation

Mike Naberezny's Blog: Easier XML-RPC for PHP 5

PHPBuilder.com: Create a PHP-based Twitter Client with the PEAR Services_Twitter Package


Community Events

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


wordpress api community podcast introduction series development framework library language voicesoftheelephpant release threedevsandamaybe opinion extension interview unittest laravel5 feature laravel

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