It's not hard to write structured elegant php, that is horseshit. Please look at code for symfony or laravel. Hell, my annoyance with writing good code in PHP is that it ends up looking like Java, which begs the question, why not just do it in java.
https://github.com/symfony/symfony/tree/master/src/Symfony
or you can look at simpler sample codes I wrote for a class in design patterns with php