Why Safari on Mac OS X can execute processingjs on local without web server like MAMP but not Chrome? There is a Apache Server include in Mac OS ?
Here is a zip folder sample.
PHP is a server-side programming language, it cannot be executed in the browser and needs to be interpreted by the server.
Apart from MAMP, you can also use the built-in Apache installation with OS X or a package manager like Homebrew or MacPorts to install a webserver with PHP support.