PHP is whitespace insensitive language that ignores whitespaces.PHP is case sensitive language but there is one condition here. In PHP, all keywords like if, else, while, echo, etc., classes, functions, and user-defined functions are NOT case-sensitive.

PHP Whitespace Insensitive

In this chapter we will study about PHP whitespace Insensitive and Case Sensitive but before we go ahead first of all we should know that what whitespace is?

Whitespace is a character which is ‘Typed’ but it remains invisible on the screen. Typically it includes space, tabs, line changes etc.

PHP is whitespace insensitive language that ignores whitespaces. This means many whitespace characters are same to one whitespace character. Check out below example the try on your text editor.

Example - 1


<?php
 $x = 'https://www.progrramers.       com   '; //Whitespace is invisible on web page
 
 $y = 'https://www.progrramers. com';   //both will produce same result
 
  echo '<a href = "https://www.progrramers.com">' .$x. '</a> <br />';
  
  echo '<a href = "https://www.progrramers.com">' .$y. '</a> <br />';
 ?>


PHP Case sensitive

If you ever heard that PHP is case sensitive than it is true PHP is case sensitive language but there is one condition here. In PHP, all keywords like if, else, while, echo, etc., classes, functions, and user-defined functions are NOT case-sensitive. You can see yourself in below example

Example - 2


<?php
 $CAR = 'Skoda';
 
  echo $CAR;
  
  echo $car;
  
  echo $Car;
 ?>


All the variables in PHP are case sensitive. In above example you can see that $Car, $car and $CAR are not similar.  We will study about variables in next chapter.

PHP Tutorials - Whitespace Insensitive and Case sensitive

progrramers-logo

progrramers

Hello friends! Progrramers is a tutorial site of w3 programming. If you like this tutorial site please encourages us by sharing this site links with your friends and nears & dears who want to learn web development and give us like on our Facebook page. If have any question please type in to comment box or send us message on social media sites via below given social links. Thank you, have a nice learning.

Post A Comment:

4 comments:

  1. Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.
    data science course in malaysia
    tableau training in malaysia
    data analytics course malaysia
    360DigiTMG

    ReplyDelete
  2. Hey, thanks for this great article I really like this post and I love your blog and also Check Python course Training in 360DIGITMG. Python Training certification program provides an overview of how Python and R programming can be employed in Data Mining of structured (RDBMS) and unstructured (Big Data) data. Comprehend the concepts of Data Preparation, Data Cleansing and Exploratory Data Analysis. Perform Text Mining to enable Customer Sentiment Analysis. Learn Machine learning and developing Machine Learning Algorithms for predictive modeling using Regression Analysis. Assimilate various black-box techniques like Neural Networks, SVM and present your findings with attractive Data Visualization techniques.
    360Digitmg Python Training institute

    ReplyDelete
  3. This is really very nice post you shared, i like the post, thanks for sharing..
    360Digitmg marketing analytics in hyderabad

    ReplyDelete
  4. I found your this post while searching for information about blog-related research ... It's a good post .. keep posting and updating information. buy real instagram likes monthly

    ReplyDelete