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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php