Created
September 13, 2012 22:12
-
-
Save jlittlejohn/3718079 to your computer and use it in GitHub Desktop.
PHP: Testing Data Types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array: <?php echo is_array($var); ?><br> | |
| boolean: <?php echo is_bool($var); ?><br> | |
| float: <?php echo is_float($var); ?><br> | |
| integer: <?php echo is_int($var); ?><br> | |
| null: <?php echo is_null($var); ?><br> | |
| number: <?php echo is_numeric($var); ?><br> | |
| string: <?php echo is_string($var); ?><br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment