Hello Justin, Thursday, April 15, 2004, 5:28:29 PM, you wrote:
>> echo setor($required_variable, die('error...'); >> or >> echo setor($error, ''); >> or >> echo setor($sMessage, $sDefaultMessage). >> or >> $z = setor($_GET['z'], 'Default'); >> $z = setor($_GET['z'], 'Default'); > Whats wrong with defining a user-level function? > function setor_array(&$array, $key, $default = 0) > { > return isset($array[$key']) ? $array[$key] : $default; > } > $nCustID = (int) setor_array($_GET, 'nCustID', 0); Such a user function would be todays best practice since neither a userfunction setor($val, $else) nor an internal implementation of such a function would work. Here Derick's argument comes into place that we cannot simply change the way variables and array offsets are accessed. The above setor_array() doesn't have that problem though. -- Best regards, Marcus mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php