On 08/02/15 19:00, Rowan Collins wrote:
> We have a single code base happily running on 5.2, 5.3, 5.4, and I think
> even 5.5, so it is definitely possible with some code bases. There were
> a few pieces that had to be changed to work right under 5.3 and 5.4, but
> none for which the new solution didn't also work under 5.2 (or, at
> least, for which a compromise didn't exist which worked under both).
> Call-time pass-by-reference was all over the place, for instance, but
> rarely actually needed, and if it was, replacing it with a
> pass-by-reference declaration would leave you with something working
> fine under 5.2.

Rewriting the the code to make it work is exactly what is taking the
time, but I DID also adopt the standard that e_strict would be required
and up until that time all the code I was involved with ran with
display_errors ON which was a conscious choice to pick up problems that
crept in when they happened rather than having to trawl through hundreds
of log files every few days. Remove 'register_globals' and a site breaks
until such time as  the code is reworked, but that code also needs to be
brought up to a better standard rather than simply hacking the
register_globals and other removed or backwards incompatible problems.

Since a large part of the code I am now supporting I did not write,
simply trying to decipher some of the strange tricks coders used to get
up to is a nightmare, and some of the new 'styles' of writing things are
going to make things considerably worse for those who are going to have
to maintain this code   in the future.

There are several pages of things that were good practice in PHP5.0 code
which will now give white screens if one tries to run them on a 'good
practice' PHP5.4 setup. Fortunately I think that I've already covered
most of the later problems in trying to make the legacy code clean
e_strict code so switching from 5.4 to 5.6 should not cause a problem,
but I'm not ready to move production beyond 5.4 as yet.

If I was only worried about a couple of sites then things would be
different, but the current catalogue is some 120 different sites some of
which are pigging ASP and I will be glad when I can finally pull them
over to PHP.

-- 
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

Reply via email to