<?php
//function that adds 1 to the argument
function addOne(&$value) {
++$value;
}
//lets try it out
addOne($variable = 5);
//print the $value now
echo($variable);
Fatal error: Uncaught Error: addOne(): Argument #1 ($value) could not be passed by reference in /in/hJrbo:8
Stack trace:
#0 {main}
thrown in /in/hJrbo on line 8
Process exited with code 255.
Fatal error: Uncaught Error: addOne(): Argument #1 ($value) cannot be passed by reference in /in/hJrbo:8
Stack trace:
#0 {main}
thrown in /in/hJrbo on line 8
Process exited with code 255.