Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Why? I like it since it's not ambiguous between concatenation and addition like in js.
-
avstuff33010yI prefer implode(' ', array('Hello','World!') ) in complex scenarios.
Or for very complex scenarios
ob_start(); ?>
Stuff HERE
<?php $buffer = ob_get_clean(); ?> -
p329298419dString concatenation held together with +'s and triple-nested template literals is basically a misdemeanor at this point. Wrote str_template so it's just format("Hello {name}", {name}) instead -- tiny, works client and server side, no engine to configure. Doesn't fix the rest of the codebase, but at least the templating part stops being embarrassing. github.com/p32929/str_template
Related Rants

Source: /r/ProgrammerHumor
String concatenation in PHP is the 'dumb'.'est';
undefined
wk30
php