Home > Backend Development > PHP Tutorial > 10 major misunderstandings to avoid in PHP language, PHP misunderstandings_PHP tutorial

10 major misunderstandings to avoid in PHP language, PHP misunderstandings_PHP tutorial

WBOY
Release: 2016-07-13 10:12:19
Original
770 people have browsed it

Top 10 Misunderstandings to Avoid in PHP Language, PHP Misunderstandings

PHP is a very popular open source server-side scripting language. Most of the websites you see on the World Wide Web are Developed using php. However, you may be surprised to notice that a small number of people swear to stay away from PHP. But what's even more surprising or shocking is that they don't use PHP due to some proven language shortcomings. Their decision not to use php was based on a misunderstanding.

Yes, what you read is a misunderstanding.

Let’s see what these misconceptions are:

 1. PHP is an object-oriented language, but it is not completely object-oriented

This is completely wrong. All programmers, especially Java programmers, who think that PHP is not completely object-oriented, need to take basic training in PHP; they will find a large number of object-oriented features in PHP. For example: interfaces, methods, abstract classes, etc. I agree that earlier PHP versions did not support many object-oriented features, but PHP5 already has strong object-oriented support. Moreover, you must not have imagined that coding would become so simple in PHP. That is because of the combination of PHP and object-oriented.

So, let’s clear up this misunderstanding.

 2.PHP cannot implement specific functions

I’m aware that this statement is vague, but I can’t think of any better way to put it. This is a very vague misunderstanding. Developers believe that PHP cannot help them implement some functions such as memory access or some functions that are not supported by major PHP distributions. But the fact is that PHP is an extensible language, so what you need to do is code it in C or C++ and then create the corresponding extension.

In fact, you don’t need to create extensions yourself at all, because there are hundreds of extensions available. The only thing you need to do is go find them.

 3.PHP is unsafe

Another misunderstanding that developers have about PHP is that PHP websites and applications are unsafe. But why would you want it to be safe by default, and why not write safe code? I know there's been a lot of unsafe PHP code out there because the initial learning curve is simple and it's easy to get started. So, as a developer, you need to make it as safe as possible.

.Net can help you be secure by default, which PHP really lacks in comparison. But if you are a well-trained programmer, then you actually don't want security help by default. Include is generally safe, but you need to be careful. A thorough understanding of instructions can help you make your code safer if their paths are dynamically generated.

 4. It cannot be adapted to large applications

Large and complex applications need to be built on their own reliable and high-performance language, which PHP does not have to a certain extent. But if you design and develop an application with a stable architecture, why would you have questions about its performance and scalability?

In fact, some top websites, such as Facebook, Wikipedia, Yahoo, etc., are built on PHP, and just as we think, these giant websites work very well.

5. PHP can only be used for website development

This is also a misunderstanding, although it seems to be somewhat logical, since PHP is the most common language used in website development. But there is also something called a command line interface, which ensures that your PHP application can run outside of the web server.

You may not believe it, but even applications that depend heavily on CPU power can be developed in PHP and run using the PHP CLI.

What’s more, if you want to develop desktop applications using PHP, don’t worry, you can do that using Windows-specific extensions.

 6. The development process is slow

This is a widely circulated misunderstanding. I don't know where it originated? This rumor may come from a period when the PHP code was very messy and the code was full of Mysql statements (they used this as a counterexample, but in fact we don't use it this way). The question is why is the development process so slow? When a large number of PHP frameworks appear, they can greatly speed up the development process. It goes without saying that you can develop a large program in a short time, no matter how complex it is. So, your development with PHP is not slow at all, especially when you use PHP framework.

 7. Professional developers don’t use PHP

PHP is for beginners, it is designed for those who are not serious about development. These statements are all related to the use of PHP. This is just a misunderstanding and there is no point in agreeing with it. There are so many web applications out there, including some big ones, that are built using PHP. You can imagine how incorrect these statements are.

 8. Performance issues

This is a tough question. This is not a misunderstanding. Just like a coin has two sides, this question has two sides. In fact, there is junk code everywhere. Implicit conversions, inapplicable modules, lack of operator overloading, etc. can affect the performance of a PHP application. But this depends on whether you have enough ability to use this language well and use it to write stable and fast applications.

Performance is determined by the architecture you design and the code you write!

9. Cheap but not good

This seems to be logically sound, but when used in PHP, it is completely misunderstood! In fact, PHP's biggest advantage is that it is free and open source, which means that most developers who provide application development services must be proficient in it. Although free open source will bring certain problems, it also provides cost advantages for customers who use their services. Compared with commercial development languages, PHP's development costs are relatively low, but this does not mean that its quality is questionable. Work with the right developers to achieve higher performance PHP applications.

10. PHP is exaggerated

Is this really the case? You are just talking nonsense. I don't think so, and many developers don't think so either.

Conclusion

This is not the end of all php lies. As the PHP language continues to develop and become more and more powerful, misunderstandings will also grow. But please don't let them fool you. Read more, ask more, do it yourself, and then you will know if it is true.

 English original text: PHP Language – Top 10 Misconceptions to Avoid

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/923716.htmlTechArticleTop 10 Misunderstandings to Avoid in PHP Language, PHP Misunderstandings PHP is a very popular open source server-side scripting language. Most of the websites you see on the World Wide Web are developed using PHP. But...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template