Closed twn39 closed 4 years ago
Hi Tang, thanks for your pull request!
In PHP 5 objects are passed by reference by default, so I don't really see why the &
would be necessarily. Could you elaborate? Thanks!
Because codeigniter manual are described, and marked: very important, maybe I need to take a closer look php5 principle。
You are right, this used to be important in the PHP 4 days, but doesn't really apply to PHP 5. See this SO question.
CodeIgniter requires it because it's designed for the broadest compatibility with PHP versions actually in use. PHP 4 has been replaced on all but the most forgotten or niche of systems (or those run by the least competent sysadmins, but I digress), so CI's minimum supported version is up to 5.2 (which, stupidly, is still widely deployed) - which means we no longer need the &
. Though it can still be useful as a reminder in some places that the return value we're expecting will be by reference, that probably won't help much here.
This change is