Hello. Recently, the question arose: I would like to know if there are any resources, etc., where you can see how the standard php functions were created, well, that is, for example, the count function. How was it created, what elementary operators does it consist of?

  • Unfortunately, in the php folder there is data mainly on zend, there is nothing about the disclosure of standard functions. All ATP. - Frank12345

3 answers 3

go here , download sortsy, then look for them any function you want.

  • Ok schyas see..PSS - Frank12345
  • I downloaded but did not find the folder; know what folder is it in? - Frank12345
  • In the archive we find the folder /php-5.2.17/ext/standard/ , and in it the file array.c. Starting from line 311 there will be an implementation of the count function. You can find any other function by PHP_FUNCTION (function name). - KoVadim

PHP source code

    php.net

    php.su

    • Sorry, you misunderstood: I do not need documentation on how they work.)) The people who created these standard php functions, they created them from ordinary primitive operators and put it all into a function that should not be invented. And just write, and she does.) It is interesting to know how they work, what they consist of. ATP in advance. - Frank12345
    • Not only count is a reference to all standard functions - Frank12345
    • Never met with such resources. Do they at all. Dig a folder php, mb there they are all described. - Kenpachi
    • PHP is "written" in C, which means you need to dig even deeper. - Andryusha
    • ATP schyas we'll see .. - Frank12345