4 ms·
> The only ceremony you need to write executable code is the <?php tag This is a really underappreciated aspect to development in general and web development i
by pjc50 6y ago
> The only ceremony you need to write executable code is the <?php tag
This is a really underappreciated aspect to development in general and web development in particular. There are (or at least were) an awful lot of "shared hosting" providers which are cheap, convenient, and run PHP and CGI only.
- TedDoesntTalk 6y agoColdFusion, Java Server Pages, and other languages copied this syntax. I don’t see it anymore except with php. Does anyone know of any other languages still in use that have this?
- freehunter 6y agoYou can do it in a lot of templating engines like Jinja2 and ERB.
- cutler 6y agoThat's not comparable with PHP as ERB files are not executable by default within the document root.
- brlewis 6y agoI thought the comment was talking about PHP already being installed, so you could just start using it.
- pjc50 6y agoAs the other comments say, it's not what the syntax is but the way it managed to get itself integrated into the webserver, originally via Apache mod_php. (mod_perl and even mod_tcl existed but were nowhere near as popular)
- lowercased 6y agoI believe mod_perl had the 'benefit' of persistent/shared state, which meant multiple users might conflict with each other (via shared memory, IIRC), and the mod_php - while it kept an interpreter bundled in each apache process - didn't leave anything around after a request.
- cutler 6y agoPerl5 has HTML::Mason which runs on Apache mod_perl. The reason that never caught-on is the liability of running mod_perl compared with mod_php which is much better at isolating global variables.