2 ms·
> if(function_exists(custom_func) { $x = @custom_func(); } http://php.net/manual/en/function.call-user-func.php http://php.net/manual/en/function.call-user-fun
by jtreminio 14y ago
> if(function_exists(custom_func) { $x = @custom_func(); }
http://php.net/manual/en/function.call-user-func.php http://php.net/manual/en/function.call-user-func.php
Why would you prepend @ to your function call?
> if((!isset($x)) || (empty($x))) { echo('Custom Error'); } else { //Do the work }
You're duplicating your efforts. empty() takes into account if a variable or key has been initialized, and also if it has a non-false value. isset() only checks if the variable/key has been intialized and nothing else.