title: Variable variables in PHP - What is their purpose?
body: <p>In PHP there's a functionality officially called "<a href="http://php.net/manual/en/language.variables.variable.php" rel="noreferrer">Variable Variables</a>" where one can assign variable variables. A variable variable takes the value of one variable as the name for a new variable! For example:</p>
  
  <pre><code>$name='Joe';
  $$name='Smith'; // could also be written as ${$name}='Smith'
  </code></pre>
  
  <p>The first variable $name contains the value 'Joe', while the second is variable named $Joe with the value 'Smith'. Take into account that PHP variables are case-sensitive!</p>
  
  <p>I've never used this functionality and do not see the purpose for that. Could someone explain to me where this functionality could be exploited as a good practise?</p>