|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9881 Varibles are not defined
Submitted: 2001-03-20 14:56 UTC Modified: 2001-03-20 15:12 UTC
From: echoz at k-designs dot com dot sg Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.0.4pl1 OS: Win95
Private report: No CVE-ID: None
 [2001-03-20 14:56 UTC] echoz at k-designs dot com dot sg
switch ($e) {

case "list";
// do this

case "add";
// do that

everytime i call the script without the varible "e" specified... they will return "Warning: Undefined variable: e in e:somewheresomehow on line 14"

please help.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-20 15:11 UTC]
Read please, this is not a bug
 [2001-03-20 15:12 UTC]
Well, define $e then. ;) Or put a '@' in front of it
to suppress the error. Or turn down the error_reporting().
Check the manual for more information on using the

And especially the section on error handling:

 [2001-03-20 15:12 UTC]
because you are using $e in the switch statement
although it has never been given a value before

if this annoies you turn of E_NOTICE warning level

or wrap your switch into 

if(isset($e)) {
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 28 09:01:24 2023 UTC