note 113013 added to language.types

From: Date: Sun, 18 Aug 2013 06:07:07 +0000
Subject: note 113013 added to language.types
Groups: php.notes 
Request: Send a blank email to php-notes+get-196000@lists.php.net to get a copy of this message
<?php /* delcare few variable to check their data type */ $intVar = 10; //Integar variable $floatVar = 2.49; //Float type aka Double $stringVar = "There are 8 data types in PHP"; // String $arrayVar = array( 'Boolean', 'Integar', 'Float aka Double', 'String', 'Array', 'Object', 'Resource', 'Null' ); // Array type $booleanVar = true; // Boolean type // Make an empty class to check object type class obj{ } $objectVar = new obj(); // To check resource type $resource = mysql_connect(); // Null value $nullVar = null; // output the data type of each variable echo gettype($intVar); echo "\n"; echo gettype($floatVar); echo "\n"; echo gettype($stringVar); echo "\n"; echo gettype($arrayVar); echo "\n"; echo gettype($booleanVar); echo "\n"; echo gettype($objectVar); echo "\n"; echo gettype($resource); echo "\n"; echo gettype($nullVar); echo "\n"; ---- Server IP: 69.147.83.199 Probable Submitter: 180.234.29.207 ---- Manual Page -- http://php.net/manual/en/language.types.php Edit -- https://master.php.net/note/edit/113013 Del: integrated -- https://master.php.net/note/delete/113013/integrated Del: useless -- https://master.php.net/note/delete/113013/useless Del: bad code -- https://master.php.net/note/delete/113013/bad+code Del: spam -- https://master.php.net/note/delete/113013/spam Del: non-english -- https://master.php.net/note/delete/113013/non-english Del: in docs -- https://master.php.net/note/delete/113013/in+docs Del: other reasons-- https://master.php.net/note/delete/113013 Reject -- https://master.php.net/note/reject/113013 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196000) next »