18

I have a local server installed on my Mac (MAMP). Where can I find the PHP functions on my computer?

What is the path to the functions folder? For instance, rand(), time(), isset(), explode().

I would like to see the code to learn from it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Bona Chon
  • 955
  • 3
  • 9
  • 11
  • 5
    Also see the **PHP Manual**. You can download it [here](http://www.php.net/download-docs.php). – flowfree Jun 02 '12 at 02:49
  • 1
    https://nikic.github.io/2012/03/16/Understanding-PHPs-internal-function-definitions.html @Bona Chon – Pie May 30 '19 at 04:19

1 Answers1

29

You can download the PHP source from the page http://php.net/downloads.php. Download and extract the archives. The standard functions are located under ext/standard.

Or simply browse them on GitHub: https://github.com/php/php-src/tree/master/ext/standard

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
scaraveos
  • 1,016
  • 2
  • 10
  • 12