Am 12.04.2011 13:33, schrieb Richard Quadling:
Notice: Undefined variable
Notice: Undefined index

To me, these two notices are totally different in severity, but that may be because of how i write my code. I'd like to be able to get rid of the "Undefined index" Notice in a nice, clean, readable way, because that does not bother me (in my style of code). I do wanna be notified if i am using an undefined variable, as that implies something wrong on a more basic level.


        $x = isset($x)?$x:'default x';

I don't want a construct for this, because I was either lazy or made a mistake when I did not define $x initially. -1


        $x = isset($_GET['x'])?$_GET['x']:'default x';

I can see the use for an alternative construct for this though, but it's not really a pressing matter to me. +0.5

But that is just me and my code.
Lars


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to