add gettype PHP
This commit is contained in:
parent
91b6aca548
commit
64f95bd183
@ -1,3 +1,4 @@
|
|||||||
# PHP
|
# PHP
|
||||||
|
|
||||||
## ...
|
## std
|
||||||
|
- [`gettype`](gettype.php) - Get the type of a variable
|
||||||
|
18
PHP/gettype.php
Normal file
18
PHP/gettype.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
// gettype(mixed $value): string
|
||||||
|
$value = 1;
|
||||||
|
|
||||||
|
// Return Values
|
||||||
|
// Possible values for the returned string are:
|
||||||
|
//
|
||||||
|
// "boolean"
|
||||||
|
// "integer"
|
||||||
|
// "double" (for historical reasons "double" is returned in case of a float, and not simply "float")
|
||||||
|
// "string"
|
||||||
|
// "array"
|
||||||
|
// "object"
|
||||||
|
// "resource"
|
||||||
|
// "resource (closed)" as of PHP 7.2.0
|
||||||
|
// "NULL"
|
||||||
|
// "unknown type"
|
||||||
|
?>
|
Loading…
Reference in New Issue
Block a user