Objects
Objects
Object Initialization
To create a new object, use the new statement to instantiate a class:
<?php class foo { function do_foo() { echo "Doing foo."; } } $bar = new foo; $bar->do_foo(); ?>
For a full discussion, see the Classes and Objects chapter.
Converting to object
If an ob