Bug #52194 [Opn->Bgs]: incorrect behaviour when printing non existend array index

From: Date: Sat, 26 Jun 2010 17:12:01 +0000
Subject: Bug #52194 [Opn->Bgs]: incorrect behaviour when printing non existend array index
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151892@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52194&edit=1 ID: 52194 Updated by: rasmus@php.net Reported by: bubi1 at mailinator dot com Summary: incorrect behaviour when printing non existend array index -Status: Open +Status: Bogus Type: Bug Package: *General Issues Operating System: all PHP Version: 5.3.2 New Comment: A string is an array of characters. You have: $arr[0] = "test"; Therefore array index 0 on that string is: $arr[0][0] which very logically is "t" Previous Comments: ------------------------------------------------------------------------ [2010-06-26 18:29:04] bubi1 at mailinator dot com Description: ------------ The code below is self explaining. Test script: --------------- php -r '$arr = array('test');var_dump($arr[0][0]);var_dump(isset($arr[0][0]));' Expected result: ---------------- NULL bool(false) Actual result: -------------- string(1) "t" bool(true) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52194&edit=1

« previous php.bugs (#151892) next »