TechniquePHP enables you to do so, although you probably will not use this feature much. It might come in handy if you expect the function to be called by some other user 's code and want to restrict the call somehow. if ($superuser) { function get_user_info($user_id, $verbosity_level = 5) { ... } } else { function get_user_info($user_id) { $verbosity_level = 1; ... } } CommentsIn the example, if the user calling get_user_info() is a superuser, she will be able to pass an additional $verbosity_level parameter. A non-superuser caller will get an error if she tries to pass that parameter. |