What does $$ mean?

Technology CommunityCategory: PHPWhat does $$ mean?
VietMX Staff asked 3 years ago

A syntax such as $$ variable is called Variable Variable. The inner $ resolves the a variable to a string, and the outer one resolves a variable by that string.

Consider:

$real_variable = 'test';
$name = 'real_variable';
echo $$name;

You will get the following output :

test