Bug #81150 [NEW]: Deprecation: Implicit conversion from float to int with array keys
| From: | call dot user dot func at gmail dot com | Date: | Thu, 17 Jun 2021 04:45:12 +0000 |
| Subject: | Bug #81150 [NEW]: Deprecation: Implicit conversion from float to int with array keys | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-234441@lists.php.net to get a copy of this message | ||
From: call dot user dot func at gmail dot com
Operating system: Windows 10
PHP version: 8.1.0alpha1
Package: *General Issues
Bug Type: Bug
Bug description:Deprecation: Implicit conversion from float to int with array keys
Description:
------------
Hi. The following code produces a deprecation warning in 8.1 alpha.
Is it used to be like this or is it a bug?
I can't find such information in the deprecation information of
https://github.com/php/php-src/blob/php-8.1.0alpha1/UPGRADING
Test script:
---------------
$arr = [];
$cellValue = 159.6;
var_dump(isset($arr[$cellValue]));
--
Edit bug report at https://bugs.php.net/bug.php?id=81150&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81150&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81150&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81150&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81150&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81150&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81150&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81150&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81150&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81150&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81150&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81150&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81150&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81150&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81150&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81150&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81150&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81150&r=mysqlcfg