News Feed
Sections




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

DevShed:
Introducing Static Members and Methods in PHP 5 (Part 1)
October 02, 2006 @ 10:40:00

DevShed has posted the first part of a two part series today looking at the use of static members and methods in classes in your PHP5 scripts.

Static properties and methods can be quite useful in a range of situations, not merely for constructing a Singleton class. This article, the first in a two-part series, introduces the basic concepts of static properties and methods, using plenty of hands-on examples.

Hopefully, by the end of this series you should be equipped with a decent knowledge of how to include static members and methods within your PHP applications with minor difficulties.

They start with a simple example of using both in a class before moving on to using the Singleton pattern working up to making a Factory for creating static objects.

0 comments voice your opinion now!
static member method php5 singleton factory tutorial static member method php5 singleton factory tutorial


blog comments powered by Disqus

Similar Posts

Gary Sieling: Scraping Google Maps Search Results with Javascript and PHP

DZone.com: Sencha Touch 2 Models - Loading And Saving Model Data Using a Proxy, PHP Example

SitePoint PHP Blog: How to tell when PHP 5 is safe to use...

PHPFreaks.com: Sessions and cookies: Adding state to a stateless protocol

JellyandCustard.com: Using DirectoryIterator to List Files in PHP


Community Events

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


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

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