Wednesday, January 7, 2015

Is PHP Case Sensitive ?

The functions, keywords, classes, and user-defined functions are NOT case-sensitive at all in PHP.

Example:
PHP Script (case-sensitive.php)

 <?php  
 ECHO "JoE World!!!<br/>";  
 echo "JoE World!!!<br/>";  
 EcHo "JoE World!!!<br/>";  
 /* variable names are case-sensitive*/  
 $food= "mo-mo";  
 echo "My favorite food is " . $food. "<br/>";  
 echo "My favorite food is " . $FOOD. "<br/>"; /*$food and $FOOD are different in PHP*/  
 ?>

No comments:

Post a Comment