Using pointers in PHP.
- by Babiker
I ask this question because i learned that in programming and designing, you must have a good reason for decisions. I am php learner and i am at a crossroad here, i am using simple incrementation to try to get what im askin across. I am certainly not here to start a debate about the pros/cons of pointers but when it comes to php, which is the better programming practice:
function increment(&$param) {
$param++;
}
Or
function increment($param){
return $param++;
}
$param = increment($param);