Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64090 invoked from network); 29 Jan 2014 19:00:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2014 19:00:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:57158] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/51-52228-BBF49E25 for ; Wed, 29 Jan 2014 14:00:13 -0500 Received: (qmail 26928 invoked by uid 89); 29 Jan 2014 18:59:24 -0000 Received: by simscan 1.3.1 ppid: 26918, pid: 26925, t: 0.0599s scanners: attach: 1.3.1 clamav: 0.96/m:52 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 29 Jan 2014 18:59:24 -0000 Message-ID: <52E95019.5050505@lsces.co.uk> Date: Wed, 29 Jan 2014 19:01:45 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23 MIME-Version: 1.0 To: internals@lists.php.net References: <4ED7146272E04A47B986ED49E771E347BBC71EE3A9@Ikarus.ameusgmbh.intern> <52E9469D.6000302@sugarcrm.com> In-Reply-To: <52E9469D.6000302@sugarcrm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: lester@lsces.co.uk (Lester Caine) Stas Malyshev wrote: >> Compare: `$str = str_replace('-', '_', $str);` >> > >> >To: `$str = $str->replace('-', '_');` >> >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. Isn't this just a mater of the increased overheads demanded by defining $str as a 'string object' over just a simple 'string'. It amasses me at times just how big some of the objects created are simply to handle what is essentially just a simple array of strings and the like. Just what overhead is being created and how much faster would things work if we returned to a less 'object based' structure? The majority of the processing I'm doing would be much faster if the database simply returned an array of variables ... -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk