ID: 38165 Updated by: [EMAIL PROTECTED] Reported By: aurelien dot riche at ac-lille dot fr -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: linux PHP Version: 5.1.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php $var[0] is perfectly valid and 'index' is autoconverted to 0. Previous Comments: ------------------------------------------------------------------------ [2006-07-20 15:58:31] aurelien dot riche at ac-lille dot fr Description: ------------ There's no error reporting for this code below... 'index' is interpreted as 1 and the value returned is the first letter of string 'hello world' If it's a normal behavior, can you specify this in the documentation ? Reproduce code: --------------- $var = 'hello world'; echo $var['index']; echo '<br/><br/>'; if(isset($var['index'])) echo 'OK'; Expected result: ---------------- Notice: Undefined offset: 'index' Actual result: -------------- h OK ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38165&edit=1