Object Initialization : Objects « Class « PHP

Object Initialization

class foo {
    function do_foo() {
        echo "Doing foo.";
$bar = new foo;

Related examples in the same category

1.Comparing Objects with == and ===
2.Create a new class and create an instance then use its property and method
3.Object Overloading
4.Object Properties
5.Object Type Information
6.Objects Within Objects
7.Creating a new object and assigning it to a variable