Reputation: 783
im pretty new to php comming from mostly java. Most of the PHP code i read, there is alot of duplication of code and almost never ever any local private methods. is there any reason for that? The only one i can come up with is if it has some performance issues? my clean code honor has a hard time leaving the code as it is.
Upvotes: 0
Views: 60
Reputation: 400972
I would say that, here, one of the problems with PHP is that's it's too easy to begin programming with it (it's free, it's easy to install, there are a lot of hosting services, ...) : there are a lot of coders who code with PHP without having actually ever taken any course of design, or who don't have much experience.
And when there are bad coders, there's bad / poor quality code.
Of course, nothing prevents you from using clean code, best practices, and all that -- on the contrary : more good code is great !
Upvotes: 3