Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96965 invoked from network); 7 Dec 2014 15:06:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2014 15:06:42 -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.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:47638] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/B1-16972-EFC64845 for ; Sun, 07 Dec 2014 10:06:40 -0500 Received: (qmail 20872 invoked by uid 89); 7 Dec 2014 15:06:36 -0000 Received: by simscan 1.3.1 ppid: 20866, pid: 20869, t: 0.0813s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.178.188.220) by mail4.serversure.net with ESMTPA; 7 Dec 2014 15:06:36 -0000 Message-ID: <54846CFB.8030104@lsces.co.uk> Date: Sun, 07 Dec 2014 15:06:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <2D560BB1-318F-461F-96CD-BE25C346E14F@gmail.com> <548311E6.9010406@gmail.com> <35C29452-6E4B-455F-9084-ECA7180EB234@gmail.com> In-Reply-To: <35C29452-6E4B-455F-9084-ECA7180EB234@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Only variables can be passed by reference From: lester@lsces.co.uk (Lester Caine) On 07/12/14 09:33, Rowan Collins wrote: > You keep talking about these "errors" being a burden on the programmer, but accepting that in principle it would be better to avoid such situations, so I want to reiterate: these are Strict Standards hints - they tell the programmer "we're not going to stop you doing this, but you might want to find a better way to write it". This seems like a perfect balance to me. This is one of those 'warnings' that inevitably appear in the legacy code and invariably the quick fix is to introduce the variable just to shut it up. It is not the right way of doing it, but unravelling why it was used in the first place can be time consuming. One of those things on the to do list to document better and then go back through and see if things can be improved. It IS the lack of better documentation on how to do things correctly which is the real problem here. Where traditionally an 'object' was an array of multidimensional data which WAS passed around by reference and that has now be wrapped in a class to modernise it. In many cases we simply don't need an array of objects, simply an array of references to the data which can be passed by reference to a 'class' of static code is the easiest and fastest way of processing material for web pages. We don't need to create magic get and set routines for every element of the data, a simple array read is ALL that is needed? -- 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