In PHP, how do I check if a function exists?

How can I check if the function my_function already exists in PHP?

Answers


Using function_exists:

if(function_exists('my_function')){
    // my_function is defined
}

Need Your Help

“use strict”: Assign Value to Multiple Variables

javascript variables var

Is there any other way in "use strict"; javascript to initialize a value to multiple variables? Because doing this:

SQL: Group by count(*) as pct of total table row count

sql postgresql

I've spent a lot of time searching for this, please let me know if duplicate.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.