note 42636 rejected from language.oop by betz

From: Date: Mon, 24 May 2004 19:02:18 +0000
Subject: note 42636 rejected from language.oop by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-70038@lists.php.net to get a copy of this message
Note Submitter: Dave ---- Check out the following code: class A { function foo() {} } function getA() {return new A;} getA()->foo(); I'm using PHP 4 and it doesn't allow me to call functions on objects returned by any kind of function. Is this changed in PHP 5? Is there any way around this? This stinks because it makes using accessor functions that return objects annoying to use in certain cases (you have to temporarily store the return value in the above case).

« previous php.notes (#70038) next »