Login |  Register 
This has got to be one of the most frequently updated PHP sites, keep up the good work...

PHP Tutorials on Code Structures

Code structures are the features of the language so how you can strucutre your code; using loops, classes and functions etc.


Arrays are one of the most widley used code strucutres in PHP, learn how to use them properly here.

Classes and object orientation

Clases and objects allow real world things to be better represented reducing the amount of code duplication in your applications.

Code Structure

In PHP there are many options on how you structure your code. This article details the advantages and disadvantages of each structuring method.


How do you use constants in PHP? This article tells you all about it!

Date and time

Date and time are very important in programming perhaps you only want to do something at a certain time, or show when a user logged in? Well this article will show you how!

Defining function parameter types

PHP is a weakly typed language so any type can be passed to a function. Unless type hinting is used! This article goes into detail on how to use type hinting.

Dynamic variables and functions

Dynamic variables and functions lets the developer choose what they want a variable or a function is at runtime allowing much more flexiblity. However it can be dificult to use properly. But this article show's you how.

Function parameters

This article introduces you to variable length function arguments and default function parameter values.


Inheritance is an important concept in object orientated languages, as it helps to reduce code duplication and PHP is no different.


Interfaces defines what functions a class must create. Interfaces help when writing large applications and are a great feather in the developers hat!

Introduction to PHP and Polymorphism

This is a easy introduction into one of the most powerful aspects of object orientated languages Polymorphism. Master this and your code will become much more flexible and maintainable.


Loops are one of the most common programming constructs and are used throughout PHP. Discover how to use them properly here.

Magic methods

Use magic methods to write less code and to define common way's of handling coding tasks.

Use magic methods to add a function to a class at runtime

More on magic methods in PHP. This article details how to add methods to a class dynamically! With reasons of why this is useful such as function overloading.

Using static methods

Static methods don't require the class they reside in to be intiated, and so are very useful for helper methods. This article goes into detail about how to use static methods.


When creating functions or variables in a class you can define what can see those items. This article explains how.