Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12153 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11780 invoked by uid 1010); 13 Aug 2004 23:00:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11735 invoked from network); 13 Aug 2004 23:00:06 -0000 Received: from unknown (HELO ostrowski.cc) (69.44.16.26) by pb1.pair.com with SMTP; 13 Aug 2004 23:00:06 -0000 Received: (from root@localhost) by ostrowski.cc (8.11.6/8.11.6) id i7DMxiE21103; Fri, 13 Aug 2004 17:59:44 -0500 Date: Fri, 13 Aug 2004 17:59:44 -0500 Message-ID: <200408132259.i7DMxiE21103@ostrowski.cc> To: internals@lists.php.net X-Mailer: NeoMail 1.25 X-IPAddress: 65.66.90.197 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Subject: Method/Function chaining? From: dan@ostrowski.cc ("Dan Ostrowski") Hello. Excuse my ignorance on this, but I can't seem to find the answer I'm looking for online... Will PHP5 be able to do "chaining" as some other languages are able to do? In other words... ------------------------------ \n"; } function getB() { return new B(); } } class B { function B() { print "made a B...
\n"; } function shout() { print "hey!!"; } } $a = &new A(); $a->getB()->shout(); ?> ---------------------------- This kind of polymorphism is something I'm used to, and I'm hoping it won't result in a parse error in PHP5. =) -- Dan Ostrowski