---- En lun, 04 may 2020 15:01:44 +0200 Matthew Brown <matthewmatt...@gmail.com> escribió ---- > This would break quite a lot of existing code, though PHP could add an > explicit keyword like "inout" that catches this behaviour (see example in > Hack: https://docs.hhvm.com/hack/functions/inout-parameters). > > Today these issues can also be caught with static analysis: > https://psalm.dev/r/1f670956ab Thanks, Matthew, I don't know about inout.
I think I’d be positive of adding `inout` keyword in order to: - Check type of out is equal to type of param( like example of my first email ). - Avoid modifying caller var value when the function throws an exception Other option is adding to normal reference( & ) these behaviours when strict_types will be activated in caller. Regards -- Manuel Canga -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php