#30292 [Opn->Bgs]: Undefined array variable gives a problem with the output

From: Date: Thu, 30 Sep 2004 13:16:20 +0000
Subject: #30292 [Opn->Bgs]: Undefined array variable gives a problem with the output
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66931@lists.php.net to get a copy of this message
ID: 30292 Updated by: tony2001@php.net Reported By: devish at zonnet dot nl -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Windows XP PHP Version: 5.0.1 New Comment: You will not get a notice here, but a parse error, because this syntax is not valid. Set display_errors to "on" and you should see it. Previous Comments: ------------------------------------------------------------------------ [2004-09-30 15:03:59] devish at zonnet dot nl Description: ------------ When declaring an array but don't initialize it, it stops running the script. When declaring a normal variable it will just produce a Undefined variable notice. In the reproduce code it will not print "hello" Offcourse this sort of code is rearly used, but the reason for reporting this is that it doesn't report a notice or any warning. Im running Win XP, with Apache 2.0 and only have one extension in my php.ini (the mysql extension) Reproduce code: --------------- <?php error_reporting(E_ALL); $int[]; print "hello"; ?> Expected result: ---------------- I expect: Notice: Undefined variable: int in E:\www-root\sqlite\test.php on line 4 hello I See: white screen ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30292&edit=1

« previous php.bugs (#66931) next »