Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13689 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76115 invoked by uid 1010); 2 Nov 2004 21:13:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76079 invoked by uid 1007); 2 Nov 2004 21:13:52 -0000 Message-ID: <20041102211352.76075.qmail@pb1.pair.com> To: internals@lists.php.net References: <10994267531880000@9866357972520000.9866341568840000> Date: Tue, 2 Nov 2004 13:13:51 -0800 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Posted-By: 169.229.135.175 Subject: Re: isset() and the new VM From: pollita@php.net ("Sara Golemon") > 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)