If PHP cannot find a function or constant named hello , then yes, it treats it as a string. However, this is bad practice, and it is even warned:
>php -r 'error_reporting(E_ALL|E_STRICT);echo gettype(blah);' PHP Notice: Use of undefined constant blah - assumed 'blah' in Command line code on line 1
So, the moral of the story is to always enable error_reporting in PHP (just like you should always use strict and use warnings in Perl).
user554546
source share