Passing by value

' . $sentence2; //Function to display passing by value function pass_ref($sentence1, &$sentence2){ //Change value of sentence 2 $sentence2 = 'I lied about that'; } //set variables $sentence1 = 'The dog ate my homework'; $sentence2 = 'The dog ate my homework'; //Call function pass_ref($sentence1, $sentence2); ?>

Passing by reference

' . $sentence2; ?>