Difference between else if and elseif

Possible duplicate:
the main difference between elseif vs else if

What is the difference between php else if and elseif conditions ...

<?php

....

else if($count == 4) {}

and

elseif($count == 4) {}

Is there any special case to use it or not? Thanks!!

+4
source share
2 answers

With curly braces, this does not matter. If you use a colon to determine your conditions, an "else if" will fail because of a parsing error.

See here for more details .

+7
source

Logically, they are exactly the same.

They can be interpreted differently by the parser, which can lead to very small differences in performance.

0
source

All Articles