HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Variable Handling Reference : Return the type of different variables
The gettype() function returns the type of a variable.
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | The type as a string. Can be one of the following values: "boolean", "integer", "double", "string", "array", "object", "resource", "NULL", "unknown type" |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.2: Closed resources are now returned as "resource (closed)". Earlier, the returned value was "unknown type". |
❮ PHP Variable Handling Reference