PHP testing if a function exists
In php you may need to check certain things are available before you call them to prevent errors or to change programming behavior depending on what functionality an object has that is passed. There are a couple functions for testing the existence of functions or variables: function_exists('func_name') isset($var) There are a couple other ones used for testing that an object/class has a method or member: method_exists($obj,'func_name') property_exists($obj,'var_name') You can also... read more!
Posted in php | Post Comment

RSS Feed