0

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

How to write similar function with php?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

How to write similar to mysql_query() function with php?
@MalcolmX - Again, there are 2 options... In C as an extension, which I doubt is what you want to do, or with PHP as in my short example. See the "User-defined" functions section of the link I provided above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.