Well...
$FOO = 'haha';
echo $foo;
# This doesn't output anything
$foo = 'haha';
echo $foo;
# This outputs: haha
Try...
$myString = 'this is a foobar string,';
echo strrchr($myString,',') == ',' ? 'true' : 'false';
Maybe you assigned $mystring and tried to check $myString