magic24688 Posted August 10, 2008 Share Posted August 10, 2008 How many PHP functions are there? Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 10, 2008 Share Posted August 10, 2008 LOL. I have no idea... Has anyone ever counted them? I know they increase/decrease (but not proportionally) as you use more/less PHP extensions.But you're not supposed to memorize them or anything... That's what the PHP Manual is for. Link to comment Share on other sites More sharing options...
magic24688 Posted August 10, 2008 Author Share Posted August 10, 2008 Maybe I wanna =]. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 10, 2008 Share Posted August 10, 2008 See if you can run this script. For some reason, Firefox wants to download it from my localhost, and then when I open it I see the raw PHP. <?phpheader('Content-type:text/plain');echo count(get_defined_functions());?> (I tried removing the header and even put a plain HTML page without PHP and Firefox still downloads it... I think something's wrong with Apache, but I have no idea what.) Link to comment Share on other sites More sharing options...
magic24688 Posted August 10, 2008 Author Share Posted August 10, 2008 Gave me a 1272 count. Didn't include all functions. But its close enough. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 10, 2008 Share Posted August 10, 2008 Use this to show the function names... <?phpheader('Content-type:text/plain');print_r(get_defined_functions());?> EDIT: And this probably doesn't include language constructs like echo. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2008 Share Posted August 11, 2008 There are exactly one brazillian functions.The set of functions in PHP is not a constant number, it depends on the installation. If you're only talking about the base PHP functions, there are not that many (a few hundred maybe). If you're talking about the entire set of functions available to PHP, then that depends on what extensions are loaded. If there are a lot of extensions loaded, then there will be a lot of functions defined. If there aren't, then there won't. But the set of functions that are a part of the core language is relatively small. Here are some:http://www.php.net/manual/en/book.info.phphttp://www.php.net/manual/en/book.outcontrol.phphttp://www.php.net/manual/en/book.errorfunc.php Link to comment Share on other sites More sharing options...
magic24688 Posted August 11, 2008 Author Share Posted August 11, 2008 There are exactly one brazillian functions.The set of functions in PHP is not a constant number, it depends on the installation. If you're only talking about the base PHP functions, there are not that many (a few hundred maybe). If you're talking about the entire set of functions available to PHP, then that depends on what extensions are loaded. If there are a lot of extensions loaded, then there will be a lot of functions defined. If there aren't, then there won't. But the set of functions that are a part of the core language is relatively small. Here are some:http://www.php.net/manual/en/book.info.phphttp://www.php.net/manual/en/book.outcontrol.phphttp://www.php.net/manual/en/book.errorfunc.php I think you mean bazillion? But to make my question more simpler. I wanted to know how many functions were listed on the Function Index. (Here). =) Link to comment Share on other sites More sharing options...
justsomeguy Posted August 11, 2008 Share Posted August 11, 2008 That page lists 5900 functions. Did you just want someone to count them for you? Keep in mind though that not all of those functions (the majority actually) will not be available to a normal out-of-the-box PHP installation, but there are 5900 functions listed in that index. Link to comment Share on other sites More sharing options...
magic24688 Posted August 11, 2008 Author Share Posted August 11, 2008 Okay, thanks. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 12, 2008 Share Posted August 12, 2008 Umm... Where did you find that number, JSG? You make me very curious. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 12, 2008 Share Posted August 12, 2008 I opened the index page, looked at the source code, and used ConTEXT to count how many times <dd class="indexentry"> shows up. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.