|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-14 17:46 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 20:00:01 2025 UTC |
Description: ------------ If I call session_register with a string key that is in fact an integer, then it creates an entry in $_SESSION that is inaccessible using array indexes by a script. I think this is because the extension is adding the key to the array directly rather than using the hash APIs that convert string keys to integers where possible. Reproduce code: --------------- <?php session_start(); session_register("123"); var_dump($_SESSION); var_dump($_SESSION["123"]); var_dump($_SESSION[123]); ?> Actual result: -------------- array(1) { ["123"]=> NULL } Notice: Undefined index: 123 in D:\ant.php on line 5 NULL Notice: Undefined offset: 123 in D:\ant.php on line 6 NULL