java程序员学php -13. 值传递与引用传递 Leave a Comment / Non-Java Language / September 4, 2011 September 4, 2011 php和Java一样,调用函数时,基本数据类型用值传递,对象用引用传递 但php也可以传递基本数据类型的引用(用 &符号): $w = 65; function change_it(&$weight){ $weight = 60; } change_it($w); echo $w; //60