Category | type check |
Code Examples | "; // prints out: boolean
echo gettype($a_str) . " "; // prints out: string // If this is an integer, increment it by four if (is_int($an_int)) { $an_int += 4; echo $an_int; } echo " "; // If $a_bool is a bool, print it out // (does not print out anything) if (is_bool($a_bool)) { echo "Boolean: $a_bool"; } |
Test Code | |
Web Link | |
Remarks | |
Cancel |