Is PHP written in C ? Where can i find the PHP source code online without having to download all of it ?
PHP has over 1000 built-in functions that can be called directly from within a script to perform a specific task in PHP Functions.
You can also define a function within another function and logically this too should be a local variable but recall the rule that all functions are global. In PHP inner functions are global and hence behave in the same way as if they had been declared outside of any containing function.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With