[#]PHP trick question, for the Friday developer: where do you put the parenthesis in a new call:
[#]phptip #php trick
https://php-tips.readthedocs.io/en/latest/tips/new_and_parenthesis.html
=> More informations about this toot | More toots from dseguy@phpc.social
@dseguy the last 3 samples on your blog i would written all of them as $Obj = (new $Obj); myself. that is my rule when magic crap starts coming into play for the class name lol.
=> More informations about this toot | More toots from bobmagicii@phpc.social
@bobmagicii Spoken like a true veteran :elephpant:
=> More informations about this toot | More toots from dseguy@phpc.social
@dseguy that and im just a huge fan of excess parens. it actually saved me once back during the php 7.0 transition (i think it was) because the order of operations changed for a few things. but not for me. because i am crazy.
=> More informations about this toot | More toots from bobmagicii@phpc.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini