snipplets.dev/code/PHP/gettype.php

19 lines
426 B
PHP
Raw Normal View History

2021-12-03 03:25:08 +03:00
<?php
2023-06-03 23:49:12 +03:00
// gettype(mixed $value): string
$value = 1;
2021-12-03 03:25:08 +03:00
2023-06-03 23:49:12 +03:00
// 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"
2021-12-03 03:25:08 +03:00
?>