# isset() and the new VM

- Thread: https://externals.io/message/13688
- Original archive: https://news-web.php.net/php.internals/13688
- Started by Frank M. Kromann on 2004-11-02T20:19:13+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #13688 — Frank M. Kromann — 2004-11-02T20:19:13+00:00

URL: https://externals.io/message/13688#13688

Hello Everyone,

isset($arr[0]['id']) used to return false if $arr[0] is undefined, but
with the new VM it throws a warning.

Is this new behavior or a bug ?

- Frank

---

## #13689 — Sara Golemon — 2004-11-02T21:13:51+00:00

URL: https://externals.io/message/13688#13689 · In reply to: #13688

> isset($arr[0]['id']) used to return false if $arr[0] is undefined, but
> with the new VM it throws a warning.
>
> Is this new behavior or a bug ?
>
I'd call it bugish, since part of the point of isset() is that it's never
supposed to throw notices on undefined vars/indices.

[sarag@cinco php5]$ sapi/cli/php -r 'error_reporting(E_ALL|E_STRICT);
ini_set("display_errors", true); var_dump(isset($arr[0]));'
bool(false)
[sarag@cinco php5]$ sapi/cli/php -r 'error_reporting(E_ALL|E_STRICT);
ini_set("display_errors", true); var_dump(isset($arr[0][0]));'

Notice: Undefined variable:  arr in Command line code on line 1
bool(false)

---

## #13690 — Jason Garber — 2004-11-02T21:26:59+00:00

URL: https://externals.io/message/13688#13690 · In reply to: #13689

> > […]

Doesn't sound right to me either...

-- 
Best regards,
 Jason                            mailto:jason@ionzoft.com

SG> I'd call it bugish, since part of the point of isset() is that it's never
SG> supposed to throw notices on undefined vars/indices.

---

## #13699 — Andi Gutmans — 2004-11-03T07:34:06+00:00

URL: https://externals.io/message/13688#13699 · In reply to: #13688

Hey,

I'm still a bit absent (my wife gave birth two days ago) but this email 
popped out at me from the millions I haven't read yet.
Just commited a fix for the problem.
I'll hopefully catch up with all the emails on internals@ in the beginning 
of next week.

Andi

At 12:19 PM 11/2/2004 -0800, Frank M. Kromann wrote:
>Hello Everyone,
>
>isset($arr[0]['id']) used to return false if $arr[0] is undefined, but
>with the new VM it throws a warning.
>
>Is this new behavior or a bug ?
>
>- Frank
