I am in need of a PHP function to check that a variable exist or not outside of function. If it does not exist, then assign a default value to it.
The function will be something like: function if_exist($argument, $default = '') where $argument will be any variable outside the function. It can be a variable's variable, and $default will be the default value of the variable if the variable doesn't exist.
Please avoid using global scope in the function, because I heard that it's not good for a site's security.