Subscribe To Our Newsletter

Sign Up Now To Get Free Coupon Codes, Event Coupon Codes Updates, Offers Updates. It's 100% Free!

We Hate Spam! Really, It's terrible and we never do it.

Some Important Things of Data Type: 4th Day Lecture of PHP


php data type

Some Important Things of Data Type in PHP

Sample 1 : Which is Faster way to print?

My General Name is Samee Ullah Feroz.
My General Company Name is Getacho.

Sample 2 : Rules for Integers

An integer must have at least one digit from 0 to 9.
An Integer cann't contain comma, space or blanks.
And Integer must have not a decimal point.
An Integer can be either positive or negative.
Integers can be specified in three formates:
  1. Decimal (10-based)
  2. Hexadecimal (16-based-prefixed with 0x)
  3. Octal (8-based-prefixed with 0)

Sample 3 : Var_dump variable usage

var_dump is a variable to show the integer type, value and size.
var_dump also add a break line in output.
var_dump Example:
50
int 50
float 100.5
string 'values' (length=6)

Sample 4 : Floating Points Numbers

float 10.365

float 2400

float 8.0E-5 



 <html>  
      <head>  
           <title>Some Important Things for Data Type: 4th Day Lecture of PHP</title>  
      </head>  
      <body>  
           <h1 align="center">Some Important Things for Data Type in PHP</h1>  
                <h2 align="left">Sample 1 : Which is Faster way to print?</h2>  
                     <?php  
                          echo "My General Name is Samee Ullah Feroz. <br />"; //It is simple form to print data  
                          echo 'My General Company Name is Getacho.' #it is faster way. because in this it just give print command.  
                      ?>  
                <h2 align="left">Sample 2 : Rules for Integers</h2>  
                     <?php  
                          echo "An integer must have at least one digit from 0 to 9. <br />";  
                          echo "An Integer cann't contain comma, space or blanks. <br />";  
                          echo "And Integer must have not a decimal point. <br />";  
                          echo "An Integer can be either positive or negative. <br />";  
                          echo "Integers can be specified in three formates:<br />";  
                          echo  
                               "<ol>  
                                    <li>Decimal (10-based)</li>  
                                    <li>Hexadecimal (16-based-prefixed with 0x)</li>  
                                    <li>Octal (8-based-prefixed with 0)</li>  
                               </ol>"  
                     ?>  
                <h2 align="left">Sample 3 : Var_dump variable usage</h2>  
                     <?php  
                          echo "var_dump is a variable to show the integer type, value and size. <br />";  
                          echo "var_dump also add a break line in output. <br />";  
                          echo "<b>var_dump Example:</b> <br />";  
                          echo  
                               $a=50;  
                               $b=100.50;  
                               $c="values";  
                               var_dump ($a, $b, $c);  
                     ?>  
                <h2 align="left">Sample 4 : Floating Points Numbers</h2>  
                     <?php   
                          $x = 10.365;  
                          var_dump($x);  
                          echo "<br />";   
                          $x = 2.4e3;  
                          var_dump($x);  
                          echo '<br />'; //I used single quote that you can remember its printing rule    
                          $x = 8E-5;  
                          var_dump($x);  
                     ?>  
      </body>  
 </html>   


Share this article :

Post a Comment

Give your reviews about this blog. Leave your comments. what do you think about this post?

Meet Samee Ullah Feroz On Google Plus
Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe Samee Articles blog.

---------------------------------------
Thanks for visiting QWC.Me.
==========================================
For free guidelines contact me on SEO Expert | Samee Ullah Feroz is online there.
==========================================
Best Regards

 
Support : | Internet Marketing Specialist And Business Developer
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger