Hm, I didn't know about $array[] = 1;. It would make sense if it were: $a[+] for push() and $a[-] for pop().
pi 12. 9. 2025 o 12:35 Ken Guest <[email protected]> napísal(a): > But we already have $array[] = 1; - are you unaware of it or is there > some other benefit to what you are suggesting? > > What might interest people would be a syntactic sugar/shorthand for > array_pop but I have no idea what that might look like. > > On Fri, 12 Sept 2025 at 11:21, Dušan Kreheľ <[email protected]> wrote: > >> A proposal to add syntactic sugar for array_push() in PHP. >> >> Syntax: >> // now >> array_push($array, 1); >> >> // new syntax >> $array[+]=1; >> >> Dušan Kreheľ >> >> > > -- > http://about.me/kenguest/ >
