String concatenation vs array implode in PHP

后端 未结 5 1755
自闭症患者
自闭症患者 2021-01-12 18:54

Having used Java for a long time my standard method for creating long strings piece by piece was to add the elements to an array and then implode the array.

         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 19:34

    Choose the more readable one. Always. This case, i would pick up the second apporach. Then optimize it, if it's a bottleneck.

提交回复
热议问题