To create a new object, use the new statement to instantiate a class:
<?phpclass foo{ function do_foo() { echo "Doing foo."; }}$bar = new foo;$bar->do_foo();?>
See also » Objects.