Hi Mick czw., 6 kwi 2023 o 10:00 mickmackusa <mickmack...@gmail.com> napisał(a):
> Call me sentimental, but are we just trying to choke out the few remaining > reasons to keep array_push() in the language? > > Okay, yeah, sometimes at is a drag that the first parameter has to be > declared in advance and is modified by reference (which means you can't > enjoy null coalescing or short ternary syntax directly in the first > parameter) but... > > The whole purpose of array_push() is to append one or more elements to an > array. Spreading the second parameter makes this task simple/clean. > https://3v4l.org/RcKRD If a parameter of array_push is a dictionary it fails with: Fatal error: Uncaught ArgumentCountError: array_push() does not accept unknown named parameters See https://3v4l.org/BHPSt Best regards, Michał Marcin Brzuchalski