How to access the class variable that available with in a class(Nested Class)
<p>HI friends here I have share my code. I am used the Nested class in this Program. When I run this code it shows the Error like this. "<strong>syntax error, unexpected T_CLASS, expecting T_FUNCTION</strong>"</p>

<pre><code>  class Nest
   {
  class Display
  { 
   private $s;
   public sum($a, $b)
 { 
   $s =$a+$b; 
 }
 function show()
 {
 echo "Sum of a and b is:: ". $s;
 }
 }
 }

 new $x = Nest::Display;
 $x-&gt;sum(12, 10);
 $x-&gt;show();
</code></pre>

<p>I don't know what mistake i did. Any one help to solve this problem.</p>
