Example #1
0
$bing = new zot();
//$bing = new zot("asdf");
$bing->afun(34);
zot();
$bing = new argconstructor(12);
$bing->afun(12);
$c = 'argconstructor';
$bap = new $c();
$bpa = new $c(12);
class bar
{
    var $baz;
    function bar($a = 'noarg')
    {
        $this->baz = $a;
    }
}
class foo
{
    var $a = 'bar';
    function assign()
    {
        $zap = new $this->a('setbaz');
        print_r($zap);
        $zap2 = new $this->a();
        print_r($zap);
    }
}
$a = new foo();
$a->assign();
print_r($a);