In PHP, dependencies are just .php files just like your own code, it all works the same.
PHP code is also typically far less complex than Python modules - modern PHP code consists of a single index.php with procedural code, and everything else is just class / function definitions, so there are no side effects.