If I try to use a variable which doesnt even exist in PHP, I dont get any errors or notices. In the example below the return value is "null". I'd like to see some form of notification if that happens so that I can find bugs in my code more easily.
echo $doesNotExist -> something; //returns null
The error reporting in my php.ini is the following
error_reporting = E_ALL
What do I have to do to see notifications when accessing varibles that don't exist?
To clarifiy this:
I know that I can check if a variable exists by using isset()
. That's not what I want though. I want to get a notification in case I accidentaly try to use a variable that does not exists. For example if I misspell the name of a variable.
display_errors = On
is in my php.ini