Re: [RFC Proposal] var keyword deprecation/removal

From: Date: Thu, 03 Mar 2016 12:47:46 +0000
Subject: Re: [RFC Proposal] var keyword deprecation/removal
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-91479@lists.php.net to get a copy of this message
Lester, > The problem with 'var' is that while one should probably > replace them all with public, there is a lot of simple legacy code still > in active use that could take years to 'tidy' 'var' would not be removed until 8.x, so you'd have several years before needing to make code changes. Additionally, the RFC will include this script which automatically upgrades legacy code in mere seconds: https://gist.github.com/colinodell/5fb5e5d474674f294a38 If you're staying on PHP 5.x or 7.0, no changes would be needed. If you're upgrading to 7.1+, you would need to either hide deprecation notices or take 30 seconds to run that script. > Only a small percentage are 'actually' replaceable by public My understanding is that 'var' is simply an alias for 'public' so they should behave identically. Could you please provide an example where 'var' is not replaceable by 'public'? Thanks for your feedback! Colin O'Dell

« previous php.internals (#91479) next »