title: Calling PHP object attribute name from variable
body: <p>There is a session variable called 'locale' with value: en.</p>
  
  <pre><code>$locale = session()-&gt;get('locale'); // value = 'en';
  </code></pre>
  
  <p>And there is an object <code>$page</code> with attributes: <code>content_en</code>, <code>content_ru</code>, <code>content_de</code>.</p>
  
  <p>All I need is to echo <code>$page-&gt;content_en</code> or <code>$page-&gt;content_ru</code> or <code>$page-&gt;content_de</code>, but depending on locale.</p>
  
  <pre><code>echo $page-&gt;content_'.session()-&gt;get('locale').';
  </code></pre>