10 misunderstandings to be avoided in PHP

Source: Internet
Author: User
Tags php cli
PHP is a very popular open-source server scripting language. most 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 is that they don't use php. PHP is a very popular open-source server-side scripting language, most 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 is that they don't need php because of some proven language flaws. They decided not to use php because of misunderstanding.

Yes, what you read are misunderstandings.

Let's take a look at these misunderstandings:

1. PHP is an object-oriented language, but the object-oriented language is not thorough.

This is totally incorrect. All programmers who think that php is not completely object-oriented, especially Java programmers, need a basic PHP Training. they will find a large number of object-oriented features in PHP. For example, interfaces, methods, and abstract classes. I agree that earlier PHP versions do not support too many object-oriented features, but PHP5 already has powerful object-oriented support. Moreover, you may not think that encoding will become so simple in PHP, because PHP is combined with object-oriented programming.

So eliminate this misunderstanding.

2. PHP cannot implement specific functions

I know this statement is vague, but I cannot come up with any better ideas. This is a vague misunderstanding. developers believe that PHP cannot help them implement some features such as memory access or some of the major PHP releases do not provide support. But the fact is that PHP is an extensible language, so what you need to do is to use C or C ++ encoding and then create the corresponding extension.

In fact, you do not need to create extensions by yourself, because there are already hundreds of available extensions. The only thing you need to do is look for them.

3. PHP is insecure.

Another misunderstanding of PHP is that PHP websites and applications are insecure. However, why do you want it to be secure by default? why not write secure code? I know that there are always a lot of insecure PHP code here, because the initial learning curve is simple and easy to use. Therefore, as a developer, you need to make it as secure as possible.

. Net can help you to be secure by default. In contrast, PHP does lack a lot. However, if you are a well-trained programmer, you should not provide security assistance by default. Include is usually safe, but you need to be careful. If their paths are dynamically generated, a thorough understanding of the commands can help you make the code safer.

4. it cannot adapt to large-scale applications

Large and complex applications need to be built on their own reliable and high-performance languages, which PHP does not have to some extent. However, if the architecture of the application you designed and developed is stable, why do you have questions about its performance and scalability?

In fact, some of the top websites, such as Facebook, Wikipedia, and Yahoo, are built based on PHP. as we think, these giant websites work well.

5. PHP can only be used for Website Development

This is also a misunderstanding, although it seems a bit logical, because PHP is the most common language in website development. But there are also some things called the command line interface, which can ensure that your PHP application can run outside the Web server.

You may not believe it, but even applications that depend heavily on CPU capabilities can run with php cli.

More importantly, if you want to use PHP to develop desktop applications, don't worry. you can do this using Windows-specific extensions.

6. slow development process

This is a widely-spread misunderstanding. I don't know where it originated? This rumor may come from a time when php code was messy and the code was filled with Mysql statements (they used this as an inverse example, but we didn't actually use it like this ). The question is, why is the development process slow? When a large number of php frameworks emerge, the development process can be greatly accelerated. Without a doubt, you can develop a large program in a short time, no matter how complicated it is. Therefore, php development is not slow, especially when you use the php framework.

7. professional developers do not use PHP

PHP is intended for beginners. it is designed for those who are not really developing. These statements are related to the use of PHP. This is just a misunderstanding. it makes no sense to recognize it. There are so many network applications, including some large ones, all built using PHP. I can imagine how incorrect these statements are.

8. performance problems

This is a tough issue. This is not a misunderstanding. This problem is the same as that of a coin. In fact, spam code is everywhere. implicit conversion, unsuitable modules, lack of operator overloading, and so on can affect the performance of a php application. However, this depends on whether you have sufficient capabilities to use this language and use it to write stable and fast applications.

Performance is determined by the architecture you designed and the code you wrote!

9. cheap and not good

This article seems to be logically valid, but it is totally wrong to use php! In fact, the biggest advantage of php is its 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 about some problems, it also provides cost advantages for customers who use their services. Compared with commercial development languages, php has a low development cost, but this does not mean its quality is questionable. Work with the right developers to get higher-performance php applications.

10. PHP has been mentioned

Is that true? Let's just talk about it. I don't think so, and many developers do not.

Conclusion

This is not the terminator of all php lies. With the continuous development of php language, php becomes more powerful and misunderstandings will also grow. But don't be fooled by them. Read more, ask more, and start on your own. then you will know if it is true.

PHP Language-Top 10 Misconceptions to Avoid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.