isset($var) vs. @$var
Posted
by Josso
on Stack Overflow
See other posts from Stack Overflow
or by Josso
Published on 2010-04-08T13:43:59Z
Indexed on
2010/04/08
13:53 UTC
Read the original article
Hit count: 326
php
|error-handling
Is this an okay practice or an acceptable way to use PHP's error suppressing?
if (isset($_REQUEST['id'] && $_REQUEST['id'] == 6) {
echo 'hi';
}
if (@$_REQUEST['id'] == 6) {
echo 'hi';
}
© Stack Overflow or respective owner