class ExampleClass {
  public $number = 4;
  
  class ExampleInnerClass {
    public $inside = "inside inner class";
  }
  
  function foo{} {
    
    $inner = new ExampleInnerClass();
    print "Inside me, the example class, there is an inner class with data '"
    .$inner->inside."''";
  }
}

$example = new ExampleClass;
$example->foo();

Returns:

Parse error: parse error, unexpected T_CLASS, expecting T_FUNCTION