Forums > php >

PHP vs HTML - Which is better for Web development?


Hectique

Professional Skid

Posts: 1262

Threads: 171

Joined: Nov, 2019

Reputation: 10

Posted

So, a big question, What's better for Web development? HTML or PHP?

Lets hop into this question!

 

So, let's start with HTML.

Html stands for Hyper Text Markup Language, and is great for Web Development, as that is Basically what it was made for. It's easy to learn, as it only takes 1 week for the average person to learn almost every concept of HTML. It can hold things like Links, Downloads, Photos and other things. HTML is also more secure than PHP, which we can get into in a minute. An Example of a website made in HTML is DLLMe

 

But what about PHP??

PHP is a language that is used to build applications, mainly Websites and Web Applications. PHP takes up more than 80% of web servers. That's a lot! It can take around 1 - 2 months for the average person to get the basics of PHP, but to master PHP?? It can take up to 2 Years!! Although PHP is a lot less secure than HTML, which once again, will be explained in a little bit, PHP can hold actual data, meaning it can store stuff like IPs, usernames, passwords, and more. Two examples of websites made in PHP are the Terraria Forum and Facebook.

 

So, PHP or HTML for web developement?

If we were to make a choice between PHP and HTML for web development purposes, I would have to say PHP. Although PHP is less secure than HTML, (PHP is less secure than HTML because PHP stores data on a database, which hackers can get into and get info. HTML on the other hand, can't store data), You can apply DDoS protection on your PHP website to make hacking into Databases and getting data harder. Also, without PHP we wouldn't have Facebook, Instagram, Snapchat, TikTok, and even more. We probably wouldn't even have these Forums!

 

I hope this explained a lot about the 2 languages, and how to choose which one for Web Developement.

I am the PROFESSIONAL SKID.

OpenGamerTips

aka H3x0R

Posts: 369

Threads: 39

Joined: Feb, 2020

Reputation: 5

Replied

PHP is old but I still prefer it over Node.js

xd

Hello, I am OpenGamerTips or H3x0R.

I code in Lua/C#

Skids will never learn.

Hectique

Professional Skid

Posts: 1262

Threads: 171

Joined: Nov, 2019

Reputation: 10

Replied

@OpenGamerTips Yeah, Node.js isn't always the most reliable, and PHP is old, but just that PHP is old doesn't mean that it is bad.

I am the PROFESSIONAL SKID.

2JJ1

CEO of Bugged Code Inc.

admin

Posts: 588

Threads: 25

Joined: Dec, 2016

Reputation: 27

Replied

The two aren't something you compare. They are built for completely different purposes. HTML is a markup language(Hypertext Markup Language). It is used to design a page and is absolutely essential. PHP is a scripting language, which is used on the backend to run operations. Stuff like querying a database then adjusting the displayed HTML based on that. When using PHP to display content on a screen, you're actually using HTML. PHP and HTML work together.

 

Your question makes more sense if you're asking about file extensions(.php vs .html). If you're talking about the technologies themselves, this is a weird question to ask; let alone state what is the better solution.

 

"PHP is a lot less secure than HTML"
PHP can be perfectly secure so long as the developer actually knows what they're doing. It just takes some time to study and not ignore documentation. Unlike me at the beginning who thought it was a good idea to rely on a YouTube series... Videos rarely cover everything. It would take too long for a video, so it makes sense.

YTBlog

Hectique

Professional Skid

Posts: 1262

Threads: 171

Joined: Nov, 2019

Reputation: 10

Replied

@2JJ1 "PHP can be perfectly secure so long as the developer actually knows what they're doing."

 

Yeah, but it can also depend on what hosting and/or database you use, because some hosting databases preapply DDoS Protection, and depending on how good of a job it did at applying it, it can leave PHP kinda insecure.

I am the PROFESSIONAL SKID.

2JJ1

CEO of Bugged Code Inc.

admin

Posts: 588

Threads: 25

Joined: Dec, 2016

Reputation: 27

Replied

A server being DDoSed does not mean a server's data is insecure. Data is still protected in the event of a DDoS. A DoS is just the server refusing to serve content; often due to too much stress on the CPU. Of course, PHP's processing could be used to stress the CPU, but so could any other language. This isn't necessarily to blame PHP. If the server is ever to go down even with the most efficient code, this means that it is a fault of the server itself not being "strong" enough to handle the stress. Rate-limits need to be applied and obviously a budget server could have a hard time-fighting 100GBps of incoming network data.

 

If you hear of any vulnerabilities regarding PHP, it is almost always due to bad code. PHP is as secure as almost any other language. Assuming you're using one of the later stable versions of course. Using an alpha or beta test version is a silly idea for production projects.

 

"but it can also depend on what hosting and/or database you use"

Now you're talking about hosting and database issues. That isn't a fault of PHP. That is a fault of hosting or a database.

YTBlog

Hectique

Professional Skid

Posts: 1262

Threads: 171

Joined: Nov, 2019

Reputation: 10

Replied

@2JJ1 "A server being DDoSed does not mean a server's data is insecure. Data is still protected in the event of a DDoS. A DoS is just the server refusing to serve content; often due to too much stress on the CPU." - Makes sense, but depending on the Protection, how strong it is, it can leave Server Ports open, making it more vulnerable for hackers to hijack a database.

I am the PROFESSIONAL SKID.

2JJ1

CEO of Bugged Code Inc.

admin

Posts: 588

Threads: 25

Joined: Dec, 2016

Reputation: 27

Replied

That would again be the fault of the server, not PHP.

YTBlog

Hectique

Professional Skid

Posts: 1262

Threads: 171

Joined: Nov, 2019

Reputation: 10

Replied

@2JJ1Thats something I forgot to mention lol

I am the PROFESSIONAL SKID.

Wabz

Longest siggy on WRD

Posts: 809

Threads: 83

Joined: Apr, 2020

Reputation: 7

Replied

Even though both languages are used for web dev, we can't really compare them because they are not in the same category. It would be like comparing CSS and Python. You still need HTML knowledge if you wanna build a website using PHP. All websites are made in HTML but some use PHP as the server side (if they need a server side). Technically, DLLMe is written in HTML but it is also writen in PHP (try to write something in their search bar.)

lol





















































































































































































































































































































































































































































Pagey

Ryan

Posts: 84

Threads: 10

Joined: Jun, 2020

Reputation: -1

Replied

HTML is utilized to create static pages though PHP is utilized to create parts which make site dynamic. The yield of PHP content is HTML as they will be like HTML records which can incorporate both HTML and PHP in content code however for the end client while opening PHP website page have the option to get to just HTML components.

 

 

I use html to design.

Added

I couldn't explain it so I had help explaing it.

Wabz

Longest siggy on WRD

Posts: 809

Threads: 83

Joined: Apr, 2020

Reputation: 7

Replied

@Pagey Why do you explain it in a complicated way?

lol