snipplets.dev/~/PHP/gettype.php

19 lines
426 B
PHP

<?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"
?>