In PHP, this character is called the backtick operator.
The literal string enclosed in backlinks is the T_ENCAPSED_AND_WHITESPACE token. You can confirm this by doing something like this:
print_r(token_get_all('<?php `uname`;'));
which gives you the following:
Array ( [0] => Array ( [0] => 367 [1] => <?php [2] => 1 ) [1] => ` [2] => Array ( [0] => 313 [1] => uname [2] => 1 ) [3] => ` [4] => ; )
And then run token_name(313) , which will give you T_ENCAPSED_AND_WHITESPACE .
For the analyzer, a string enclosed in backlinks is equivalent to a string with variables in it , for example, "hello $world" . The literal / constant part of the string (part hello ) T_ENCAPSED_AND_WHITESPACE .
So, to answer your question, all you can do is with a string containing the variables you can do, with a string wrapped in backlinks.
So why T_ENCAPSED_AND_WHITESPACE ? Probably because, like a string containing variables, this value is determined at runtime. While a T_CONSTANT_ENCAPSED_STRING (normal literal string) is like a constant in the eyes of the parser.
jnrbsn
source share