Re: PHP5 only sure .. E_STRICT?

From: Date: Wed, 12 Jul 2006 08:08:56 +0000
Subject: Re: PHP5 only sure .. E_STRICT?
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43398@lists.php.net to get a copy of this message
Raphaël Gertz wrote:
Le mercredi 12 juillet 2006 00:50, Lukas Smith a écrit : Markus Tacker wrote:
So, they say what's E_STRICT will not work in PHP6. What's not may become E_STRICT in future releases of PHP.
This solution would not require any large changes in PHP internals. They would simply need to make sure that all new E_STRICT messages follow this defined schema.
Why makes php code hugly to track E_STRICT programmer errors ???
This will not affect php code, only error messages.
If you realy want to get rid of the E_STRICT error : => Add that before the pear call (require, include) : //FIXME : workaround until PEAR MDB2 becomes php5 E_STRICT ready $old = error_reporting(E_ALL); => Add that after the pear call //FIXME : restore old E_STRICT mode error_reporting($old); And fix the pear E_STRICT errors...
This will mean that you either get all E_STRICT or no E_STRICT messages. This is not feasible. The solution I am proposing would mean that you can say "give me all E_STRICT error messages that existed in a given PHP release". That way people can realistically code against E_STRICT, while remaining compatible with previous PHP versions.
E_STRICT error are added one by one when you increase php version, but some may be removed, the E_STRICT error are issue by zend parser if I remember well, then notice things that will not be supported in future.
Correct.
Anyway, on production box php should be configurer like that : report E_ALL display error false log error true
I was not talking about production systems. The problem is that if you get flooded by E_STRICT messages you cannot fix, because you want to stay compatible with a previous release of the same major version you will go nuts during development. The filtering solution will allow you to more sanely work with E_STRICT.
ps : don't comply on a opensource project, if it don't fit your needs, simply makes a patch to have the thinks working like you wants... (and submit it to the php team to fix it)
I actually discussed the topic and possible solutions first with the people from internals.
With php5 they introduced E_STRICT feature to solve the problem of upgrade and help people to know where they will be bugs in future...
Which is why the aim must be to make E_STRICT feasible for PEAR. regards, Lukas

« previous php.pear.dev (#43398) next »