Bug #78893 [NEW]: Inconsistent return value of gettype
From: gmblar+php at gmail dot com
Operating system: MacOS 10.15.1
PHP version: 7.4.0
Package: Variables related
Bug Type: Bug
Bug description:Inconsistent return value of gettype
Description:
------------
Return value of gettype not match the names used as type hints of
parameters, properties or ReflectionType.
Test script:
---------------
var_dump(gettype(true));
var_dump(gettype(false));
var_dump(gettype(1337));
var_dump(gettype(23.42));
Expected result:
----------------
string(4) "bool"
string(4) "bool"
string(3) "int"
string(5) "float"
Actual result:
--------------
string(7) "boolean"
string(7) "boolean"
string(7) "integer"
string(6) "double"
--
Edit bug report at https://bugs.php.net/bug.php?id=78893&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78893&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78893&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78893&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78893&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78893&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78893&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78893&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78893&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78893&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78893&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78893&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78893&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78893&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78893&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78893&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78893&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78893&r=mysqlcfg
Thread (4 messages)
- gmblar+php at gmail dot com