Single statement inside if, else-if or else without curly braces, can be written in a single line called shorthand if.

Syntax

if(condition) 
   // Single statement
else if(condition) 
   // Single statement
else if(condition) 
   // Single statement
else
 // Single statement

Example

<?php

 $a = 20;
   
 if($a < 20) echo "a is less than 20";

?>
<?php

 $a = 20;
   
 if($a < 20) 
   echo "a is less than 20";
 else if($a == 20)
   echo "a is equals to 20";
else
 echo "a is greater than 20";
?>