<?php
$foo = new foobar();
/* this breaks in PHP 4, even if $foo->a is an object with
another member variable $b within it */
echo $foo->a->b;
/* This is how it would have to work in PHP 4 */
$tmp = $foo->a;
echo $tmp->b;
<?php
echo $foo->a->b;