views:

235

answers:

1

I'm basically wondering what is included in each error level, as found here in PHP. Example, where does an unset variable or key fall? Or where does a parse fall? I can't seem to find any documentation on the PHP website or general internet regarding this.

Edit: I'm looking for a list of what error causes what error level/type or the other way around.

+1  A: 

For each specific case, the manual says what type of error would be thrown. For example, if you look in the variables section, you will see that an unset variable will throw an E_NOTICE error. The same follows for other language constructs, function definitions, extensions and so forth. Simply check the manual.

Eran Galperin
Is there a place where someone has listed each one and what it's used for? This is kind of annoying if you want to decide when to do something based on the type of error.
Darryl Hein
The link you provided lists them. To list every possible scenario that each occurs in would not be feasible in one place (there are too many possibilites). Simply check for the cases you want to test for.
Eran Galperin
But the list of unset key or variable -> E_NOTICE, etc would not be hard to create and there are not infinite possibilities.
Darryl Hein
I've never encountered such a list. If I needed to know what type of error a specific error would trigger, I looked in the manual.
Eran Galperin
the only way i can think of to get such a list is to grep the src files of the php (including the extensions) for the type of error you want