Object Initialization

<?php
class foo {
    function do_foo() {
        echo "Doing foo.";
    }
}
$bar = new foo;
$bar->do_foo();
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.