In cold fusion we set <cfparam name="var" default="0"> so that it won't fail if the var isn't defined. Has php something similar to this??
No need to define variable in PHP...
You can use if ( isset($variable_name)) { //defined } else { //not defined }
In function definitions default values are specified:
function dostuff($param='some default') { .... }