Frankly, I do not think that your code is the problem. I've written various variations and they all work.
$fname="Dmitriy";
$fname=strtolower(strval($fname));
print("$fname");
above example works great
$fname="Dmitriy";
echo strtolower(strval($fname));
this example works also
I don't think that it's the code. However keep in mind I am using PHP 4.0.6. You might be using different version - may be that could be the case...
Di