And another situation... <?php function &a() { if(1==2) return new B; //some reference... else return null; //error, we cant create B } $b_instance = a(); ?>
And we got Notice... Notice: Only variable references should be returned by reference in - on line 6 But if we modify code to: <?php function &a() { $b = null; if(1==2) return new B; else return $b; } $b_instance = a(); ?> Than all ok, no notices, and i got what i want... but it's a kludge :-/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php