If you want to check some modern PHP code, you can check some pieces of mine (this project in particular could have a little cleaner code, but I think it demonstrates well what modern PHP can look like):
Your examples are ironically a great showcase of what I hate about PHP. Java-style object-obsessed programming with long names, piles of design patterns and dozens of imports, along with C-style syntax and dollars before variable names.
If you want to check some modern PHP code, you can check some pieces of mine (this project in particular could have a little cleaner code, but I think it demonstrates well what modern PHP can look like):
Your examples are ironically a great showcase of what I hate about PHP. Java-style object-obsessed programming with long names, piles of design patterns and dozens of imports, along with C-style syntax and dollars before variable names.