Bug #74727 [NEW]: Bug in gettype() function
| From: | kmgkumar28 at gmail dot com | Date: | Fri, 09 Jun 2017 11:02:49 +0000 |
| Subject: | Bug #74727 [NEW]: Bug in gettype() function | ||
| Groups: | php.standards | ||
| Request: | Send a blank email to standards-+get-1274@lists.php.net to get a copy of this message | ||
From: kmgkumar28 at gmail dot com
Operating system: Windows 7
PHP version: 7.2.0alpha1
Package: PHP Language Specification
Bug Type: Bug
Bug description:Bug in gettype() function
Description:
------------
In Using The following code the datatype does not returns correctly in
output.
i sent name value in '123' in html page but here i will only get string
value,
in similar results in if i set name = 12.32 , null.
<html>
<form name = "post" >
<input type = "text" name = "name" />
<input type = "submit" name = "submit" />
<?php
echo gettype($_POST['name']);
?>
Expected result:
----------------
1) if i set the html text box value as number it returns integer
2) if i set the html text box value as text it returns string
3) if i set the html text box value as null it returns NULL
Actual result:
--------------
1) i set the html text box value as number it returns string
2) i set the html text box value as text it returns string
3) i set the html text box value as null it returns string
--
Edit bug report at https://bugs.php.net/bug.php?id=74727&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74727&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74727&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74727&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74727&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74727&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74727&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74727&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74727&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74727&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74727&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74727&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74727&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74727&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74727&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74727&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74727&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74727&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74727&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74727&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74727&r=mysqlcfg