@randyrie your running two seperate web servers with totally different characteristics, like running text edit and MS Word to view the same textfile-and expecting the results to look identical.
Pinegrow runs its own server, you view its output in a browser via port 4000 or whatever - this is the texedit view, it doesnt parse PHP files and do funky PHP stuff.
Your MAC is ALSO running a webserver! This is the Word version, will whatever all singing and dancing capabilities you have installed and whatever version of PHP it is running. This is usually on and defaults too, port 80
They are BOTH viewed via “localhost” url and whatver the rest if thr URI is.
Now, when you view via. Port 4000, you are viewing the PG server’s output of your file in your browser.
WHEN YOU DELETE THE PORT 4000, YOUR BROWSER DEFAULTS TO PORT 80- and you are then viewing the funky, full blown PHP rendered version of your file on your MAC’S WEB SERVER.-you are no longer viewing via the PG internal server.
Its like looking at your kitchen table from the outside of your house through 2 different windows- one sparkly and super thr other, well could do with some fixing up!
Table is your php file/site
2 windows, are web serverz, house is your Mac.
So if you actually have that set up correctly, use it!
You are trying to get PG webserver tondonsomething it cant, instead of just using your exisitng webserver, which can, and either refresh browser when you save or use a browser live reload function plugin, like VSCode editor has-which you use.
So get the plugin, do your php coding in that, open your browser open the php file project and click “live view” at the bottom of the editor.
Job done
No mamp
VSCode also has a “live Server” plugin- this is similar to the PG approach- it is a seperate server again, I am not sure of its capabilities with PHP