Easy Wither Call

no-email (Benoit Viguier), Benoit Viguier
Sun, 17 Dec 2023 00:00:00 +0000

Can be useful to create "with-ers" in an immutable (value) object with a LOT of readonly properties.
'+' is the addition of arrays, the first values have priority.
get_defined_vars() gets the local variables, with their name, unlike func_get_args().
Valid in PHP 8.1, with support for variadic and named keys.