What is the correct way to include files for classes before implementing inheritance in PHP?

When implementing inheritance in PHP, it is crucial to include the files containing the parent and child classes before defining the child class that extends the parent class. This ensures that the child class has access to the parent class's methods and properties. To do this, use the `require_once` or `include_once` function to include the necessary files before defining the child class.

<?php
// Include the file containing the parent class
require_once 'ParentClass.php';

// Include the file containing the child class
require_once 'ChildClass.php';

// Define the child class that extends the parent class
class ChildClass extends ParentClass {
    // Child class implementation
}
?>