php speed testing of conditionals -


Assume that there is already a statement on the page.

Now, out of:

  If another makes a statement and if   

who is the fastest and slowest?

Does this make any difference $ $ takes only 2 potential values?

Edit: Sample code:

  $ a = 2; If ($ a == 1) {...}   

THEN

  if ($ a == 2) {...}   

OR

  other {...}   

OR

  else if ($ A == 2) {...}    

While I crave For the momentum, I think that measuring the benchmark of PHP conditionals would be something that would not be decisive due to many different variables affecting your output.

With this, the benchmark shows between the if / elseif / else statement as opposed to the switch / case statement.

Hope you will be able to feed your Uber, Enterprise level desires!

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -