Work from the lab.

Here you can view my latest lab projects.

Search by tag.

include, include_once & require in PHP 5

PHP5

include, include_once & require in PHP 5

There are a number of built in functions that can be used to load external files into PHP scripts. The functions 'include', 'include_once' and 'require' may seem to perform the same function but there are key differences.

View Post

Creating a Router and Dealer messaging system using ZeroMQ, Node.js and PHP

Javascript, Node.js, PHP5, Sockets, ZeroMQ

Creating a Router and Dealer messaging system using ZeroMQ, Node.js and PHP

An example of how you can communicate between Node.js and PHP using ZeroMQ.

View Post

__autoload in PHP 5

PHP5

__autoload in PHP 5

Using the autoload magic method to include external PHP files.

View Post

__clone in PHP 5

PHP5

__clone in PHP 5

An example of creating and cloning an object using PHP.

View Post

__call in PHP 5

PHP5

__call in PHP 5

An example of how you can use the __call magic method in PHP.

View Post

__isset & __unset in PHP 5

PHP5

__isset & __unset in PHP 5

Using the magic methods __isset and __unset in PHP.

View Post

__sleep & __wakeup in PHP 5

PHP5

__sleep & __wakeup in PHP 5

When you serialize and unserialize a PHP object, PHP will automatically check to see if there is a __sleep or __wakeup magic method in the class (depending on weather your serializing or unserializing). Here is an example of how you can use both functions.

View Post

Public, Private & Protected in PHP 5

PHP5

Public, Private & Protected in PHP 5

Public, Private and Protected are access identifiers that allow you to specify what level of access other code has to certain variables and methods within an individual class. Here you will find examples of the public, private and protected identifiers.

View Post

__destruct in PHP 5

PHP5

__destruct in PHP 5

is ok, the main difference between protected and private class properties is that protected properties can also be accessed by extended classes.

View Post

__construct in PHP 5

PHP5

__construct in PHP 5

Introduction to the __construct method in PHP5.

View Post

Creating a Class Object with PHP 5

PHP5

Creating a Class Object with PHP 5

In this tutorial I will show you how to create a PHP object using a 'Web Developer' class.

View Post

The Factory Pattern in PHP 5

Patterns, PHP5

The Factory Pattern in PHP 5

The factory is one of the most common OOP patterns. Here I will use the 'shape' concept to demonstrate its use.

View Post