Is executing PHP faster with strict standards?

I canโ€™t believe that I canโ€™t do something interesting for this question, but in any case ...

My logical assumption was that scripts that obey all the rules that strict standards dictate will run faster.

On the other hand, if scripts work without strict standards, then maybe strict standards are just an extra step in checking the compilation process ...

Is there official information on which is faster? Thank you

+6
source share
1 answer

It should be faster ..

The simple reason is that the PHP error triggering system is quite heavy, and even if E_STRICT errors are suppressed, they still introduce an error mechanism (only to ignore).

But actually it depends a lot on the situation, because I could imagine that working around E_STRICT in itself could also be heavier than the original solution.

Despite this, using E_STRICT is a smart idea and allows you to use more portable, future code. However, I would not use performance as a good reason to start writing rigorous PHP code.

+6
source

All Articles