Using pointers in PHP.
Posted
by Babiker
on Stack Overflow
See other posts from Stack Overflow
or by Babiker
Published on 2010-06-03T00:27:57Z
Indexed on
2010/06/03
0:34 UTC
Read the original article
Hit count: 317
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);
© Stack Overflow or respective owner