views:

120

answers:

4

Hi, does any one know how many built in functions are there in PHP (latest version)?

Thanks

+8  A: 

Count them here: http://php.net/quickref.php

Paolo
+1 Ahh yes, the Rainman approach. Functions .. toothpicks, cards, what's the difference? :)
Tim Post
5701 on that page
Robin
5701 is the correct answer
coderex
+1  A: 

http://php.net/quickref.php shows a total of 5368 functions.

alexn
I get 5701 just like Robin - you must be missing a few! ;)
meouw
I swear, i counted like three times.
alexn
+3  A: 

Six. Definitely Six.

Tim Post
Wrong! The correct answer is 42.
Gordon
but there are 7 ways to do everything in PHP -> 42/7 = 6
meouw
+7  A: 

You could use a core function to count the number of functions available in the core and installed extensions:

$funcs = get_defined_functions();
echo count($funcs['internal']);
GZipp
+1 This is my favourite and completely version-independent.
Pekka