Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the misunderstandings about PHP language?

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the relevant knowledge of "what are the misunderstandings in the understanding of PHP language". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

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

This is totally wrong. All programmers who think that php is not completely object-oriented, especially Java programmers, need basic training in the last PHP; they will find a lot of object-oriented features in PHP. For example: interfaces, methods, abstract classes, and so on. I agree that earlier versions of PHP do not support too many object-oriented features, but PHP5 already has strong object-oriented support. And you wouldn't expect coding to be so simple in PHP because of the combination of PHP and object-oriented.

So dispel this misunderstanding.

2.PHP cannot implement specific functions

I know very well that this statement is vague, but I can't think of anything better. This is a vague misunderstanding that developers don't think PHP can help them implement features such as memory access or features that are not supported by major distributions of PHP. But the truth is that PHP is an extensible language, so all you need to do is code in C or C++, and then create the corresponding extension.

In fact, you don't need to create your own extensions at all, because there are already hundreds of extensions available. The only thing you need to do is to find them.

3.PHP is not safe.

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

.net can help you be safe by default, but PHP really lacks a lot. But if you are a trained programmer, you don't really need security help by default. Include is usually safe, but you need to be careful. If their paths are dynamically generated, a thorough understanding of the instructions can help you make your code more secure.

4. It is not suitable for large-scale applications.

Large and complex applications need to be built on their own reliable and high-performance language, which PHP does not have to some extent. But if the architecture of the application you design and develop 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 based on PHP, and as we thought, these giant sites 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 is also something called the command line interface, which ensures 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 be developed in PHP and run using PHP CLI.

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

6. The development process is slow

This is a misunderstanding that has been widely circulated. I don't know where it originated. This myth may come from a time when the php code was messy and the code was full of Mysql statements (they used this as a counterexample, but we didn't actually use it). The question is, why is the development process so slow? When a large number of php frameworks appear, the development process can be greatly accelerated. There is no doubt that you can develop a large program in a short time, no matter how complex it is. So, it's not slow for you to develop with php, especially if you're using the php framework.

7. Professional developers do not use PHP

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

8. Performance problem

This is a thorny problem. This is not a misunderstanding. Like coins with two sides, the problem is two-sided. In fact, there is a lot of junk code everywhere, implicit conversion, inappropriate modules, lack of operator overloading, and so on can affect the performance of a php application. But it depends on whether you have the ability to use the 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 goods are not good.

This seems to hold up logically, but when it comes to php, it is completely misunderstood! 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 and open source can cause some problems, it also provides a cost advantage for customers who use their services. Compared with commercial development languages, the development cost of php is lower than the price, but this does not mean that its quality is questionable. Working with the right developers, you can get higher-performance php applications.

10. PHP exaggerated

Is that true? You're talking nonsense. I don't think so, and many developers don't think so either.

This is the end of the content of "what are the misunderstandings in the understanding of PHP language". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report