Smarty (and other tpl ngins): assign and assign_by_ref

后端 未结 3 1818
心在旅途
心在旅途 2021-01-14 16:41

This is not just about Smarty, but I guess most template engines that have variables assigned. It\'s more a theoretical question, than a practical. I have no use case.

3条回答
  •  逝去的感伤
    2021-01-14 17:35

    PHP uses copy-on-write when passing arrays around, so no extra memory is used until you modify the array. Sorry, no link to back up this claim.

提交回复
热议问题