This shows you the differences between two versions of the page.
uphp:functions:function_exists [2017/04/06 12:04] jeff created |
uphp:functions:function_exists [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======function_exists====== | ||
- | |||
- | < | ||
- | |||
- | Checks if a function (custom or native) exists and returns 1 if so | ||
- | |||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | [[function_exists]] ( | ||
- | < | ||
- | <span style=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | </ | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | < | ||
- | |||
- | < | ||
- | |||
- | ====Return Value==== | ||
- | |||
- | Any type depending on the way the function is defined | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | <? | ||
- | function my_add($x, | ||
- | return $x+$y; | ||
- | } | ||
- | $result=call_user_func(" | ||
- | print($result); | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[uphp: | ||
- | |||
- | [[uphp: | ||
- | |||
- | ====Additional Information==== | ||
- | |||
- | User defined functions can take many different forms, and it is not necessary to use [[call_user_func()]] to execute a function unless a direct return value is needed. | ||
- | |||
- | If used within a function, the [[uphp: | ||