PHP Tutorial

Define PHP

PHP Installation

PHP INI File

PHP Comment

PHP Case Sensitivity

PHP Variable, DataType

PHP Echo & Print

PHP Operators

PHP Receiving Input

Decision Making - if...else

PHP Switch Case

PHP Loops

PHP Jumping Statement

PHP Image Gallery

PHP File Upload

PHP Arrays

PHP Date Functions

PHP String Functions

PHP Math Functions

PHP Functions

PHP Variable Scope

PHP Constant Variable

PHP Superglobals

PHP Form Validation

PHP Include Statement

PHP Filter

PHP File Handling

PHP Cookies

PHP Session

PHP Send Emails

PHP Captcha

PHP MySQL Select

PHP MySQL Insert

PHP MySQL Delete

PHP MySQL Update

PHP MySQL Injection

PHP Assignment

Page Stats

Visitor: 436

PHP Case Sensitivity

In PHP, all keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are NOT case-sensitive. However all variable names are case-sensitive.

Example 1: Echo Keyword can be written in following ways:

<?php
   echo "echo keyword in lower letter <br>";
   Echo "Echo keyword in sentance case <br>";
   EcHo "EcHo keyword in mixed case <br>";
   ECHO "ECHO keyword in capital case <br>";
?> 
Output:
echo keyword in lower letter
Echo keyword in sentance case
EcHo keyword in mixed case
ECHO keyword in capital

Example 2: PHP variable declaration and use.

<?php
   $name="Rasmus Lerdorf";
   $dob="22 November 1968";
   $YEAR="1995";
   echo "PHP Developed By $name in $year <br>";
   echo "DOB of $NAME is $dob";
?> 
Output:
PHP Developed By Rasmus Lerdorf in 
DOB of is 22 November 1968