How to check if function exists?

Or – how to avoid re-declaring functions? Function redeclaration often occurs if you work with different versions of PHP, ie. on development and on production server. In that case we usually use PHP function function_exists. In next example we will check if function money_format is defined or not. if (!function_exists(‘money_format’)) {   function money_format() {…