.net framework 4.0 40 signs that you are still a PHP newbie
I would like to include this article in my "Programming Mistakes" series. Although I have been exposed to software engineering, enterprise software architecture and database design in regular university courses, I still feel the "guilt" of the following facts from time to time. Of course, these are all my subjective feelings and are oriented towards Eclipse:
You are a PHP newbie if you:
1. Don’t know how to properly comment your code using tools like phpDoc
2. Turn a blind eye to good integrated development environments like Zend Studio or Eclipse PDT
3. Never Have used any form of version control system, such as Subclipse
4. Do not adopt certain coding and naming standards, as well as common conventions, and cannot implement them in the project development cycle
5. Do not use a unified development method
6. Do not convert (or ) nor validate certain inputs or SQL query strings (Translation: refer to PHP related functions)
7. Do not plan your program thoroughly before coding
8. Do not use test-driven development
9. Do not code and test with errors enabled (Annotation: refer to the PHP function error_reporting)
10. Turn a blind eye to the benefits of the debugger
11. Not refactor your code
12. Not use an MVC-like pattern to separate different levels of the program
13. Don’t know these concepts: KISS , DRY, MVC, OOP, REST
14. Instead of returning, directly output (echo/print) content in your function or class
15. Turn a blind eye to the advantages of unit testing or general testing
16. Always return hard coding HTML, but does not return pure data, strings, or objects
17. Always hardcode "message" and "configuration parameters"
18. Do not optimize SQL query statements
19. Do not use __autoload (translation annotation) : Refer to the relevant description in the PHP manual)
20. Intelligent error handling is not allowed (Translation: refer to PEAR's ErrorStack)
21. Use $_GET instead of $_POST to do destructive transfer operations
22. Don't know how to use regular expressions
23. Never heard of SQL injection or cross-site scripting
24. Simple configuration is not allowed, and the constructor of the class is not allowed to accept parameter transfer and then execute the set/get method, or constant definition at runtime
25. Don’t understand Advantages and Disadvantages of Object-Oriented Programming (OOP)
26. Abusing OOP regardless of the size of the situation
27. Thinking that achieving reusable software must equal/need to make your code follow OOP
28. Not utilizing smart defaults
29. There is no single configuration file
30. I don’t want to expose the file source code, but use the .inc suffix instead of .php
31. Don’t use the database abstraction layer
32. Can’t maintain the DRY style, that is, don’t repeat yourself, if you always You are copying and pasting something, which shows that your design is poor
33. There is no implementation of a function/class/method that only does one thing, nor can they be combined and used
34. Failed to try the strengths of OOP, such as abstract classes, Interfaces, polymorphism, inheritance, access control modifiers (Annotation: such as public, private, protected)
35. Do not use existing design patterns to optimize your program architecture design
36. Do not allow your users to operate when you have many files or Define the basic directory in the case of a directory
37. Pollute the namespace, such as naming your library functions with common strings
38. Do not use table prefixes when using database tables
39. Do not use a unified template engine
40. Don’t follow The existing PHP development framework is too lazy to explore; in fact, advanced development concepts and wonderful code are contained in it.
Translation Note: There is also a translated version of "40 Bad Habits of PHP Programmers" by Ma Yongzhan, which is concise and equipped with translator's notes.
The above introduces .net framework 4.0 40 signs that you are still a newbie in PHP, including the content of .net framework 4.0. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
