How to determine if a function is defined in php? I would like to do something like:
if(! function_defined(money_format)) // function not defined on windows { function money_format($str) { ... } }
Is this possible in php?
You can use a function function_existsto determine if a function has been defined.
function_exists
It should be noted that you need to use method_exists to find out if a particular method is defined.
Source: https://habr.com/ru/post/1705108/More articles:Embed HTML files in other HTML pages - htmlUsing delegates and announcing events - event-handlingTable reel / Eager Spool - optimizationIs there any hard data about the value of control inversion or dependency injection? - dependency-injectionFinding static class attributes in Python - pythonUsing the Enterprise Library Logging Application Block in NHibernate - nhibernateItem level permissions (edit only their own, but read all) - sharepointWhat are the most active Ruby forums / blogs on the Internet? - ruby | fooobar.comStrengthen ASP.NET Compilation - asp.netDoes iPhone support 24-bit PNG with alpha transparency? - iphoneAll Articles