0

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.

1
  • 1
    Examples please. Might be you just went over dirty code. There is no reason why woulnd't use DRY code or utilize Design patterns, proper OOP, etc in PHP. Commented Apr 23, 2010 at 11:57

1 Answer 1

3

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 !

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.