On 21.01.2017 at 19:11, Rowan Collins wrote: > On 21/01/2017 17:42, Christoph M. Becker wrote: > >> In the long run (i.e. for PHP 8) I'd suggest to purge the $num_points >> parameter altogether, relying solely on the number of $points given. > > Since there's a 4th parameter ($color), what would "purge" mean in this > case? Reducing the number of parameters to 3 would be very confusing, > because existing code passing $num_points would be interpreted as > passing that value as $color. > > We could ignore the argument whatever value was provided; or we could > document that it should be passed as null, and raise a warning if it's > anything else; or we could ignore it if it matched the length of > $points, and raise a warning or error if it didn't...
I haven't really though about how to do that, because PHP 8 is too far away, and for now I'm interested in a clean solution that can be applied to PHP 7(.2) -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php