Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71738 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60143 invoked from network); 29 Jan 2014 18:21:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2014 18:21:23 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.133 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.133 smtp133.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.133] ([67.192.241.133:38409] helo=smtp133.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/A0-52228-2A649E25 for ; Wed, 29 Jan 2014 13:21:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp13.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id D90353D218F; Wed, 29 Jan 2014 13:21:19 -0500 (EST) X-Virus-Scanned: OK Received: by smtp13.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id D73BD3D35E8; Wed, 29 Jan 2014 13:21:18 -0500 (EST) Message-ID: <52E9469D.6000302@sugarcrm.com> Date: Wed, 29 Jan 2014 10:21:17 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Christian Stoller , Levi Morrison , Larry Garfield CC: internals References: <4ED7146272E04A47B986ED49E771E347BBC71EE3A9@Ikarus.ameusgmbh.intern> In-Reply-To: <4ED7146272E04A47B986ED49E771E347BBC71EE3A9@Ikarus.ameusgmbh.intern> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Compare: `$str = str_replace('-', '_', $str);` > > To: `$str = $str->replace('-', '_');` > > Or: `$keys = array_keys($array);` > > To: `$keys = $array->keys();` > > I think it looks a lot cleaner, self-explaining, shorter, and if you > are used to write OOP, it fits better to the rest of your code. I think it has very little difference and entirely a matter of personal taste. But the thing is - nobody prevents anybody from writing an extension that does string ops or array ops as an object. Yet it did not happen in last 10 years, AFAIK. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227