Fixed Inheritiance bug and Circular Reference Exception

* When using multiple `extends` in PHP, the order was wrong
* The circular reference path was incorrect when mixing PHP's `extend` and mapping extends, made the exception message less verbose.