I am wondering about returning value to a parameter instead of using =
example of "normal" way how to get return value
function dummy() {
return false;
}
$var = dummy();
But I am looking for a method how to associate return value without using =
, like preg_match_all()
function dummy($return_here) {
return false;
}
dummy($var2);
var_dump($var2); //would output BOOLEAN(FALSE)
I am sure it has something to do with pointers but in preg_match_all()
I never send any pointer to variable or am I mistaken?
preg_match_all('!\d+!', $data, $matches); // I am sending $matches here not &$matches
//I didn't know what to search for well it is simple CALL BY REFERENCE