Bug #81001 [NEW]: var_export/serialize changes array key type
From: smokey101stair at gmail dot com
Operating system: Ubuntu 20.04
PHP version: Irrelevant
Package: Arrays related
Bug Type: Bug
Bug description:var_export/serialize changes array key type
Description:
------------
When using var_export() or serialize() to export an array that has base
10 numeric strings as array keys, those keys are changed to integers.
Keys that are strings should stay strings. If this is intended behavior,
it should be documented that array key types are subject to change.
Test script:
---------------
https://3v4l.org/1RsHW
--
Edit bug report at https://bugs.php.net/bug.php?id=81001&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81001&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81001&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81001&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81001&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81001&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81001&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81001&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81001&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81001&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81001&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81001&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81001&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81001&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81001&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81001&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81001&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81001&r=mysqlcfg
Thread (2 messages)
- smokey101stair at gmail dot com