472,131 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

What are the Pros and Cons of PHP?

xarzu
88 64KB
What are the pros and cons of plain PHP or Classic ASP?

PHP and Classic ASP are server-side scripting languages. What is wrong with having a website written in this instead of the trendy JavaScript Frameworks like React, Angular etc.? If memory serves me correctly, there is an issue with security where you can post in a text box some script and hack into a system.

Can we please discuss some pitfalls or drawbacks to having a website written entirely in PHP or ASP? What does a JavaScript framework or Node.js bring to the table that would otherwise be lacking?

I am just now venturing into a contract where I am tasked with updating and maintaining existing code. All I know right now is that it is written in PHP and Classic ASP. I am in the process of investigating these scripting languages and I want to know what the opinion of other developers are.
Jul 23 '21 #1
5 9814
dev7060
624 Expert 512MB
PHP is as secure as any other language. The application code is as secure as the developer makes it.

If memory serves me correctly, there is an issue with security where you can post in a text box some script and hack into a system.
Follow the best practices to prevent SQL injections.
Jul 24 '21 #2
TatsianaIsakova
12 Byte
There's nothing wrong with PHP, actually. It still powers the majority of website thanks to its safe, user-friendly, and sophisticated user experience. As for the security issue, you need to select the framework that ensures advanced security functions like Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), SQL Injection.

Our company gets a lot of PHP 'orders' so I wouldn't say it's losing its popularity to React and such.

In this post, for example, our developers share their take on PHP and its frameworks. You can read it for a more in-depth insight into the technology.
Jul 26 '21 #3
PHP as a server-side web development language has evolved from the small open-source project. It was created in 1995 by Rasmus Lerdorf who wrote a few CGI programs and managed to make them work with web forms and databases. He hasn’t aimed to create a new programming language but it turned to become among one of the biggest open-source languages. Anyone can make a contribution to the new release including task deployment, testing, documentation, and sources.

Thanks to its accessibility, PHP has gained popularity among a huge number of developers. It might be a common choice for newcomers, as its learning curve is much easier in comparison with others.

The PHP community has various open-source free libraries, tools and extensions. For example MySQL Extension, it allows developers to create PHP apps that interact with the database while enabling improved statement and transaction support.

In the light of ASP vs PHP comparison, the PHP developers deal with the other type of code – interpreted one that is completely written in C. It allows excellent customization nevertheless that might be the cause for some bugs and poor coding.

Since this server-side language was initially released for web development, it is efficient in communicating and accessing most types of databases. Due to its adaptability and flexibility, developers are not limited in their choice. Moreover, PHP can have support for other services covering different protocols like POP3, HTTP, IMAP, LDAP, etc.

Consequently, being open-sourced turned out to be a great solution for the PHP web development community. They have gained the biggest market share and keep on the constant improvements and regular releases.

The first reason why PHP is good for web development is that this programming language has been initially presented as a web scripting language. It is greatly supported and improved by its own community that consists of more than 5 million PHP developers. The open-source programming language is quite popular among newcomers and has gained the biggest market share. Its supportive community keeps on growing for more than 25 years.

Working with open source has its own advantages and disadvantages. In fact, this language is easy to learn, compatible with different servers, and suitable for various web applications. Another distinction of PHP development is the interpreted code. This type of code is usually executed on the server, later generated into HTML, and only then sent to the user side. Accordingly, the execution time is longer and might get some errors with importing heavy files and lead to slower performance compared to other languages.

On the other side, PHP web development is often chosen for increased scalability. This is accomplished by adding more servers. The overall workload will be distributed between them and can handle more user requests. This approach relies upon the horizontal scalability that differs PHP from ASP.NET.

Having a number of in-built security features, PHP is still considered less secure compared with other web-server programming languages. While obtaining more flexibility in writing the code, engineers have more responsibilities to secure it and can’t rely only on the in-build tools.

Lower development and maintenance cost is usually acknowledged as a great benefit. PHP developers have access to all the tools and libraries without any additional fees. Moreover, developers can choose among the different hosting services and have the opportunity to pay less.

This adaptable and flexible programming language can easily meet the primary needs of web development. However, the companies need to outline their needs at first and make sure it corresponds to the set requirements and final goals.
Aug 13 '21 #4
elianawilson
2 2Bits
Pros of Using PHP
1. Speed up custom web application development
2. Simplify web application maintenance
3. No need to write additional code
4. Work with databases more efficiently
5. Automate common web development tasks
6. Protect websites from targeted security attacks
7. Perform unit testing efficiently
8. No need to increase web development cost

Cons of Using PHP
1. Programmers need to learn PHP frameworks instead of PHP
2. Quality of PHP frameworks differs
3. Lack of option to modify core behavior
4. Affect Speed and performance of websites
Sep 7 '21 #5
Vanisha
25 16bit
PHP is a widely used server-side programming language that has been around since the mid-1990s. As with any technology, there are pros and cons to using PHP. Here are some of the most notable ones:
Pros:

Easy to learn
Open-source
Large community and ecosystem
Cross-platform compatibility
Fast and efficient

Cons:

Security
Inconsistency
Scalability
Limited support for asynchronous programming
Legacy code

Join PHP Online Training
Feb 15 '23 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Ronnie Patton | last post: by
reply views Thread by Sniffle | last post: by
5 posts views Thread by Fred | last post: by
5 posts views Thread by JayCallas | last post: by
5 posts views Thread by sinister | last post: by
1 post views Thread by Doogie | last post: by
62 posts views Thread by estherschindler | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.