Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49112 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71979 invoked from network); 22 Jul 2010 23:47:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2010 23:47:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=h.reindl@thelounge.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=h.reindl@thelounge.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thelounge.net designates 195.34.141.34 as permitted sender) X-PHP-List-Original-Sender: h.reindl@thelounge.net X-Host-Fingerprint: 195.34.141.34 mail.thelounge.net Windows 98 (1) Received: from [195.34.141.34] ([195.34.141.34:55210] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 13/89-18391-4A8D84C4 for ; Thu, 22 Jul 2010 19:47:49 -0400 Received: from srv-rhsoft.rhsoft.net (local.rhsoft.net [84.113.45.182]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.thelounge.net (Postfix) with ESMTPSA id 5F49AD0; Fri, 23 Jul 2010 01:47:45 +0200 (CEST) Message-ID: <4C48D8A1.90309@thelounge.net> Date: Fri, 23 Jul 2010 01:47:45 +0200 Organization: the lounge interactive design User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100721 Remi/fc12 Lightning/1.0b2pre Thunderbird/3.1.1 MIME-Version: 1.0 To: Karoly Negyesi CC: internals@lists.php.net References: <4C48D326.6070609@thelounge.net> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Remove variable function and method calls From: h.reindl@thelounge.net (Reindl Harald) Am 23.07.2010 01:36, schrieb Karoly Negyesi: >> public function __get($subclass) >> { >> $include_file = CONTENTLOUNGE_BASEDIR . 'api_' . $subclass . '.php'; >> $class_name = 'cl_' . $subclass; >> $this->$subclass = new $class_name(); >> return $this->$subclass; >> } > > And this code contains no variable function call. You mixed it up with > a variable class name perhaps? That's why I want to nuke it... You said "Remove variable function and method calls" There are sure thousands of nice implementations you like to kill because you do not like such code - So do not write such code but stop to try kill things that are making php strong in so many cases! I do not waste time to search throw-away-code which was only used one time to convert / import wahtever some htings with quick&dirty-implementation where it does not matter if this is beautiful, it has to run once and save time instead of doing something manually And yes there are sue cases to swithc an internal method-call by some parameters - the question is not if this is good on all places where such things are used - the question is why will you kill it?