24
Comments
  • 11
    Why? I like it since it's not ambiguous between concatenation and addition like in js.
  • 3
    I prefer implode(' ', array('Hello','World!') ) in complex scenarios.

    Or for very complex scenarios
    ob_start(); ?>
    Stuff HERE
    <?php $buffer = ob_get_clean(); ?>
  • 2
    Some have . Some , some + who cares?
  • 0
    Same in Perl
  • 2
    Coming from a Java/c++ context this got me confused at first.
  • 0
    String 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
Add Comment