- var_dump: documentation ( source)
<?php
$great = 'abc';
${'great '} = 'def';
const great = 'ghi';
$ghi = '...';
${"ෝ"} = 'Meh'; // ${\u{ddd}} = 'Meh';
var_dump("${great }"); // outputs the constant value's variable value
var_dump("${'great '}"); // outputs the ${'great '} variable value
var_dump("${great}"); // outputs the $great variable value
var_dump("${'ෝ'}"); // outputs the ${\u{ddd}} variable value
var_dump("${ෝ}"); // outputs the ${\u{ddd}} variable value
/*
Even though "great " is not a valid variable name, neither is "\u{ddd}"
but that still works. I'd therefore expect "${great }" to firstly
search for a variable named "great " before falling back to evaluating
the expression first.
*/