Home Backend Development PHP Tutorial 10 Misunderstandings to Avoid in Understanding the PHP Language_PHP Tutorial

10 Misunderstandings to Avoid in Understanding the PHP Language_PHP Tutorial

Jul 13, 2016 am 10:28 AM
php language

PHP is a very popular open source server-side scripting language, and 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 perhaps shocking, is that they don't use PHP because of some proven language shortcoming. They decided not to use php because of misunderstanding.
Yes, those you read are misunderstandings.
Let’s take a look at these misunderstandings:

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 know that this statement is very vague, but I can't think of any better way to say it. This is a very vague misunderstanding. Developers believe that PHP cannot help them implement some functions such as memory access or that some major PHP distributions do not provide support. 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 even need to create extensions yourself 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 adapt 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 of. 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 those applications that depend heavily on CPU power can be developed in PHP and run using the PHP CLI.
More importantly, 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 misunderstanding that has been widely circulated. 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 tricky issue. 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 all 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 a complete misunderstanding! 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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/788638.htmlTechArticlePHP is a very popular open source server-side scripting language, and 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...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to deal with request header errors in PHP language development? How to deal with request header errors in PHP language development? Jun 10, 2023 pm 05:24 PM

In PHP language development, request header errors are usually caused by some problems in HTTP requests. These issues may include invalid request headers, missing request bodies, and unrecognized encoding formats. Correctly handling these request header errors is the key to ensuring application stability and security. In this article, we will discuss some best practices for handling PHP request header errors to help you build more reliable and secure applications. Checking the request method The HTTP protocol specifies a set of available request methods (e.g. GET, POS

How to use PHP's Ctype extension? How to use PHP's Ctype extension? Jun 03, 2023 pm 10:40 PM

PHP is a very popular programming language that allows developers to create a wide variety of applications. However, sometimes when writing PHP code, we need to handle and validate characters. This is where PHP's Ctype extension comes in handy. This article will introduce how to use PHP's Ctype extension. What are Ctype extensions? The Ctype extension for PHP is a very useful tool that provides various functions to verify the character type in a string. These functions include isalnum, is

How to use Behat in PHP programming? How to use Behat in PHP programming? Jun 12, 2023 am 08:39 AM

In PHP programming, Behat is a very useful tool that can help programmers better understand business requirements during the development process and ensure the quality of the code. In this article, we will introduce how to use Behat in PHP programming. 1. What is Behat? Behat is a behavior-driven development (BDD) framework that couples PHP code through language description (use cases written in Gherkin language), thereby enabling code and business requirements to work together. Use Behat to do

How to avoid path traversal vulnerability security issues in PHP language development How to avoid path traversal vulnerability security issues in PHP language development Jun 10, 2023 am 09:43 AM

With the development of Internet technology, more and more websites and applications are developed using PHP language. However, security issues also arise. One of the common security issues is path traversal vulnerabilities. In this article, we will explore how to avoid path traversal vulnerabilities in PHP language development to ensure application security. What is a path traversal vulnerability? Path traversal vulnerability (PathTraversal) is a common web vulnerability that allows an attacker to access the web server without authorization.

The php language supports several comment styles The php language supports several comment styles Feb 15, 2022 pm 02:05 PM

PHP language supports 3 comment styles: 1. C++ style, using the "//" symbol and the syntax "//comment content"; 2. C language style, using the "/* */" symbol and the syntax "/* comment content*" /"; 3. Shell style (Perl style), using the "#" symbol and the syntax "#comment content".

How to use Phpt for unit testing in PHP How to use Phpt for unit testing in PHP Jun 27, 2023 am 08:35 AM

In modern development, unit testing has become a necessary step. It can be used to ensure that your code behaves as expected and that bugs can be fixed at any time. In PHP development, Phpt is a very popular unit testing tool, which is very convenient to write and execute unit tests. In this article, we will explore how to use Phpt for unit testing. 1. What is PhptPhpt is a simple but powerful unit testing tool, which is part of PHP testing. Phpt test cases are a series of PHP source code snippets whose

Common errors and solutions when parsing JSON in PHP language development Common errors and solutions when parsing JSON in PHP language development Jun 10, 2023 pm 12:00 PM

In PHP language development, it is often necessary to parse JSON data for subsequent data processing and operations. However, when parsing JSON, it is easy to encounter various errors and problems. This article will introduce common errors and processing methods to help PHP developers better process JSON data. 1. JSON format error The most common error is that the JSON format is incorrect. JSON data must comply with the JSON specification, that is, the data must be a collection of key-value pairs, and use curly brackets ({}) and square brackets ([]) to contain the data.

How to avoid LDAP related vulnerabilities in PHP language development? How to avoid LDAP related vulnerabilities in PHP language development? Jun 10, 2023 pm 09:18 PM

LDAP (Lightweight Directory Access Protocol) is a common network protocol used to access and manage directory services. In PHP language development, LDAP is often used to interact with external LDAP directory services, such as identity authentication and user authorization. However, due to the nature of LDAP, it also has some security vulnerabilities, such as LDAP injection and LDAP override issues. This article will explore how to avoid LDAP-related vulnerabilities in PHP language development. Avoid LDAP injection LDAP injection is a common security vulnerability, something like

See all articles