I knew that in PHP you could define a class and regardless of its position in the file, you could use the class. For example, take a look at the code below:
<?php
//First case. No errors.
class Second extends First{}
class First{};
//Second case. Still nothing.
abstract class B extends A{};
class C extends B{};
class A{};
//Fatal error!
class C1 extends B1 { };
abstract class B1 extends A1{ };
class A1 { };
?>
First two cases are fine but not the last one. Why? Is there any rule?
P.S; I'm using PHP 5.6.25, Apache 2.4, CentOS 6.7.