Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20753 invoked from network); 18 Apr 2008 16:25:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2008 16:25:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 208.70.128.56 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 208.70.128.56 smtp-gw30.mailanyone.net Received: from [208.70.128.56] ([208.70.128.56:36950] helo=smtp-gw30.mailanyone.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/02-10014-49BC8084 for ; Fri, 18 Apr 2008 12:25:57 -0400 Received: from mailanyone.net by smtp-gw30.mailanyone.net with esmtpsa (TLSv1:RC4-MD5:128) (MailAnyone extSMTP sam@sambarrow.com) id 1JmtPM-0000zR-4k for internals@lists.php.net; Fri, 18 Apr 2008 11:25:53 -0500 To: internals@lists.php.net Content-Type: text/plain Date: Fri, 18 Apr 2008 12:23:22 -0400 Message-ID: <1208535802.22418.1.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Subject: Object instantiation From: sam@sambarrow.com (Sam Barrow) I had a question about object instantiation. You can do this: function createObject() { return new myObject; } $result = createObject() -> myMethod(); But you can't do this: $result = new myObject -> myMethod(); Is there a technical reaosn as to why this can't be done? If not can this be changed?