3 ms·
Fun thing about that : core PHP used to and still is very very close to HTTP, to the point where I would say your average decent PHP programmer used to knows mo
by nolok 2y ago
Fun thing about that : core PHP used to and still is very very close to HTTP, to the point where I would say your average decent PHP programmer used to knows more about how HTTP work that your average other similar language where the web library abstract stuff. Eg a PHP dev knows a form has to be multipart/form-data if you send files etc ...
But one of the if not THE major exception is this : buffering and flushing works automagically and a lot of PHP dev end up massively blindsinded by it at some point
PS: with the rise of modern PHP and it's high quality object based framework, this become less and less true
PS2: I am not in ANY way saying anything good or bad or superior or inferior about any dev here, just a difference in approach
- JodieBenitez 2y agoWell... not sure it was that magic. We used to play a lot with the ob_* functions.
- nolok 2y agoOh I didn't mean it figured stuff out in a smart way, only that it did auto buffering/chuncking/flushing for you in a way to abstract that whole idea from the dev, while other plateform had you care about it (cf above messages). But yeah the moment you ended up wanting to do anything advanced, you were doing your own buffer on top of that anyway, or disabling it and going raw.
- JodieBenitez 2y agoand the joy of "pure php scripts" with closing ?> tags messing with the output when you didn't want it... all in libraries you had no say... I can't say I miss those days ! Or this platform for that matter.
- lifthrasiir 2y agoEventually people started omitting ?> at the very end, which is correct but also unsettling.
- gary_0 2y agoIt's even recommended in the PHP docs: https://www.php.net/manual/en/language.basic-syntax.phptags.php https://www.php.net/manual/en/language.basic-syntax.phptags....
- earthboundkid 2y agoWhen I started my first job, I was like "Hey, these files don't have a closing ?>!!" and then my boss sighed.
- stefs 2y agoso irksome having to leave the tags unbalanced!
- matsemann 2y agoThis gave me flashbacks to my youth of PHP programming. " headers already sent by (output started at ....", when you tried to modify headers but had already started to write the http content (hence the header part was set in stone)
- nolok 2y agoAnd of course it was a space before or after the php delimiters in some random file.
- marcosdumay 2y agoGood thing zero width space wasn't common in texts back then when PHP was the most common platform.
- rstuart4133 2y agoErr, https://w3techs.com/technologies/overview/programming_language https://w3techs.com/technologies/overview/programming_langua... : PHP 75.8% Ruby 6.0% ....