When I run locally:
function sayHello($name) {
echo 'Hello $name';
}
sayHello('Lucas');
what I get in the browser is Hello $name
. I know "Hello " . $name;
will do but I am just curious because it is working fine for the guy on youtube, it is showing the right result for him.
I am running PHP 7.1 in MAMP and MacOS.