How to understand PHP Opcodes?

I know that the simplest thing to benchmark script is by seeing its opcodes.
But, how can I know that one performs better than another ?
Is the one with more opcodes performs slower ?
But, what if the opcodes are in the same number ?

Can you tell me which one of two below performs better ?


Which one performed faster? You’d need actual timing data, not number of operations, because a single operation could take an atomic tick, or it could take 300ms. How long did the system take to process Step 25? It’s most likely your biggest timecrunch, being that it’s a function call to another function that’ll run a bunch of steps…

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.