In ruby a lot of methods have the ! marker which usually means a variable will be modified in place. So you could do
p "HELLO".downcase!
which is the same as
s = "HELLO".downcase
p s
In php you can use a pointer with the ampersand & symbol before a variable to modify it in place, or handle the var as a pointer. But does a function modifier exist or variable modifier that would allow for in place modification of varibales like
$str = "hi world";
str_replace("hi", "world", &$str)