MalcolmX
MalcolmX

Reputation: 141

how to write function with php (similar to mysql_query)

how we can see the contents such as mysql_query() functions ?

How to write similar function with php?

Upvotes: 0

Views: 104

Answers (1)

Francois Deschenes
Francois Deschenes

Reputation: 24989

To see the source of the PHP function, you would have to download the source and look at the files and folders in the "ext" folder. PHP is written in C. You could write your own extensions in C and compile them in to PHP.

You can write your own PHP function, in PHP, like this:

function name_of_your_function($parameter1, $parameter2)
{
  // Do something useful here.
}

For more information, see http://php.net/manual/en/language.functions.php.

Upvotes: 1

Related Questions