mikesta707 Posted August 7, 2009 Share Posted August 7, 2009 Can you pass values by reference, Ala other high level languages like C++ (and Java I think) for example, would the following compile? function afunction(&$refVar, $otherVar, $another){ //do stuff //with function //return something, also change $refVar } Link to comment https://forums.phpfreaks.com/topic/169251-solved-passing-values-by-reference/ Share on other sites More sharing options...
Maq Posted August 7, 2009 Share Posted August 7, 2009 Insert Quote Can you pass values by reference, Ala other high level languages like C++ (and Java I think) Yes. Please read the manual - Passing by Reference. for example, would the following compile? Why don't you test it out? Link to comment https://forums.phpfreaks.com/topic/169251-solved-passing-values-by-reference/#findComment-893105 Share on other sites More sharing options...
mikesta707 Posted August 7, 2009 Author Share Posted August 7, 2009 excellent. thank you! sorry, I don't really know why i didn't just google this... Link to comment https://forums.phpfreaks.com/topic/169251-solved-passing-values-by-reference/#findComment-893111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.