Jump to Main Content
PHP Cheat Sheet

Author Me Date 2008/5/16

Just some of the PHP tips/tricks I've looked up at one time or another and needed to be reminded how to do....

Class Definitions

PHP class definitions allow for a pseudo object-oriented programming methodology. This is a basic framework definition.

class objectName () {
    var varName1 = true;
    var varName2 = 42;

    function functionName (var=default) {
       // do something here;

Misc Tips

Dynamic Object Values

Allows you to create object value names based upon an assigned variable.

e.g. $this->{"_".$key} = $val;


Post Comment
Comment Rules*
Auto Approval for Registrants
Msg Icon*
URL Email Images Inside images Smiley Flash _XOOPS_FORM_ALTYOUTUBE Source code Quote

Bold Italic Underline Linethrough  Left Center Right  

Click the Preview to see the content in action.
Enable Smiley Icons 
Enable XOOPS Codes (BBCode) 
Auto wrap lines 
Confirmation Code*

Click to refresh the image if it is not clear enough.

Input letters in the image
The code is case-insensitive



(c) 2006-2007 - Mark Boyden
Privacy - Legal Stuff - Contacts