note 103068 added to function.get-defined-functions

From: Date: Wed, 23 Mar 2011 17:41:50 +0000
Subject: note 103068 added to function.get-defined-functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-178138@lists.php.net to get a copy of this message
Not sure what Chaos was trying to achieve, but if you wanted a more granular version of function_exists(), this would be an improvement: /** * @param $function_name Name of the function * @param $group Context (internal | user) * * @return TRUE if function exists */ function better_user_func_exists($function_name = "my_function", $group = "internal") { return in_array($function_name, ($group == "internal") ? array_shift(get_defined_functions()) : array_pop(get_defined_functions()) ); } ---- Server IP: 192.41.42.26 Probable Submitter: 124.190.251.137 ---- Manual Page -- http://www.php.net/manual/en/function.get-defined-functions.php Edit -- https://master.php.net/note/edit/103068 Del: integrated -- https://master.php.net/note/delete/103068/integrated Del: useless -- https://master.php.net/note/delete/103068/useless Del: bad code -- https://master.php.net/note/delete/103068/bad+code Del: spam -- https://master.php.net/note/delete/103068/spam Del: non-english -- https://master.php.net/note/delete/103068/non-english Del: in docs -- https://master.php.net/note/delete/103068/in+docs Del: other reasons-- https://master.php.net/note/delete/103068 Reject -- https://master.php.net/note/reject/103068 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178138) next »