13

Is PHP written in C ? Where can i find the PHP source code online without having to download all of it ?

1
  • PHP is open-source. Everything is available. Commented Oct 14, 2011 at 14:25

2 Answers 2

24

PHP functions are written in C - you can find the browsable source code at lxr.php.net.

For example: http://lxr.php.net/opengrok/xref/PHP_5_3/ext/standard/array.c#1242

PS: Usually you can find function definitions just by typing the function name in the search. With commonly used function like in_array you will get loads of other results though. In this case just search for "PHP_FUNCTION in_array" (with quotes).

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

3 Comments

Exactly what i was looking for, thank you. Didn't want to go through the process of downloading all the source code!
Now that site is down, any suggestion?
7

ALL in-built functions in PHP are written in C - the source language for PHP. All the PHP source is freely available. Just choose a "source" package when you're downloading from PHP.net.

Comments

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.