Figured out the problem. If I add double quotation marks around my parameter, it works. Can anyone explain to me why this happens?
Oh, now I understand. The problem is that "T-Bone" is a string in PHP, but T-Bone is... well, I am not sure what it is, but the PHP interpreter probably (reluctantly) interpreted T as a string and Bone as another string, and the result of 'T'-'Bone' is 0. Effectively, you were calling nickname2fullname(0) instead of nickname2fullname("T-Bone").
I note that the PHP interpreter does this "reluctantly" since it will emit a notice, but you probably disabled notices in error_reporting, or worse still, you are programming with display_errors off. You should develop scripts with error_reporting set to at least E_ALL and display_errors on, and then switch display_errors to off for a production website and use logging instead.