MAMP should handle any valid PHP.
by default the MAMP install turns of error displays. You can change that by adding a .htaccess file to in your case the HTdocs folder.
The needed filke can be created with any text editor it must be named .htaccess (you maybe warned about the dot(.) as it will not be seen once created.
the file needs a single entry: php_flag display_errors 1
you can also check the PHP log that MAMP puts out: /Applications/MAMP/logs/php_error.log
As a followup. Once error checking was turned on I received this error:
PHP Fatal error: Uncaught Error: Call to undefined function split() in /Applications/MAMP/htdocs/ad_rotator/ad_rotator0.php
Upon checking on php split function I found that it is GONE in version 7.0 My site is running php 5.x
LESSON: Run the same version of PHP in MAMP as you do on your server!!!