Objects

Object Initialization

To initialize an object, you use the new statement to instantiate the object to a variable.

class foo {
    function do_foo () { 
        echo "Doing foo."; 
    }
}

$bar = new foo;
$bar -> do_foo ();