Why is PHP such a piece of fucking shit?

Why is PHP such a piece of fucking shit?

Attached: 1200px-PHP-logo.svg.png (1200x648, 73K)

Other urls found in this thread:

learnbchs.org/
learnbchs.org/https://learnbchs.org/
infoq.com/news/2009/08/google-chose-jetty
twitter.com/SFWRedditVideos

It was designed by someone who had literally no idea what they were doing.

There are worse languages out there. In terms of web technologies, it's really not that bad, but that's not saying much.

Name one

VB promotes all sorts of bad coding styles, and is way too verbose

Not him, but I'm having difficulty just because PHP is so prevalent when it clearly shouldn't be. I'm sure there are worse languages out there, such as Brainfuck or LISP, but those are niche languages that will never see use in a professional production environment.

PHP is bloat
learnbchs.org/
learnbchs.org/https://learnbchs.org/

>It was designed by someone who had literally no idea what they were doing.
Itt: people who don't know what php is and write their opinion.

You fucking faggot, php was made to work as an html preprocessor on top of your C program.
So instead of your server running a binary written in C and compiled with gcc while having the logic and the html inside it,
You used C for the logic and php only for your html templates or elements.
Idiots, also known as webdev, were so fucking stupid that moved the logic from C to php, so Lerdorf had to start optimizing php for if statements and while loops.
...and that's how idiots ruined php.
And those are the idiots that nowadays use javascript and python on anything.

I can relate.

php is great and fast and works great on micro boards with 2 1ghz cores even when serving 100 connections simultaneously

PHP is great
Symfony is a nice framework

I hate php.

python cgi is my preferred solution for small-scale stuff.

larger scale; java servlet in a tomcat (or whatever) server

javascript.

Hi Rasmus, nice to see you....

>javascript
I know it's cool to hate on JavaScript and all, but this really isn't the case

what if?
>(possible) javascript syntax were redone so that it looks like jQuery by default?
>(probably not in my lifetime) they threw out javascript and had a "pythonic" web scripting language?

>LISP
>a worse language
Go bait somewhere else

>jquery by default
>python as a web language
>can't greentext properly

what if you killed yourself right fucking now?

It's not you are just trash at programming faggot.

Because you can't write your own web pre-processor?
I'm using PHP for my projects and it works well. Until I hit some sort of PHP wall or massive security issue, I'm going to continue using an industrial standard language.

>industrial standard
can you name a "industrial" web service that uses php in this day and age? (aside from fucking Jow Forums......)

whats wrong with php?
it's a nice c style language, very flexible and for that reason beats the living shit out of perl and python

only javascript is better because it can be used for server and client

as long as you write your code carefully to respect types you shouldn't have problems

>only javascript is better because it can be used for server
server side js... anyone who does this should be given the clockwork orange treatment

Facebook you dunce

Attached: 1548692149614564.png (1007x429, 33K)

>idiots ruined
what a surprise

>MUH BLOAT

Listen you little faggot you are doing web dev, you dont need epic performance like you were calculating the velocity of molecules of dick going inside your mom, you are just serving web pages who cares about the performance when you can have an easier time developing

facebook doesn't use php. for sure that's false. do you have a source?

i would bet that FB is all based on java servlets

If it's slow like shit, it uses Java.
If it's fast as hell, it uses PHP.
Simple.

Facebook uses Hack now dumbfuck

ah okay, so maybe wikipedia is an example of something in the real world that actually uses php primarily. but remember, wikipedia is not "industry", it's a funded-by-charity website

the others, like facebook and google, notice they also have "Yes" in other columns like Java. and for sure google is based all around java servlets running in jetty
infoq.com/news/2009/08/google-chose-jetty

maybe google and facebook have a few pieces of php for minor features, but i'm 99% sure it's mostly java servlets doing the real work

Hack looks like the bastard child of PHP, JS, and Java. Funnily enough, they're all languages I'm comfortable with. I'm gonna look into it some more.

the language is pretty hideous but working with PHP7 is actually great when using a framework like Slim or Symfony. I recommend giving Slim a shot, and just abide by your standard OO-principles.

Notice that C# is the only language that can power a big webpage by itself.

javascript

Another user here.
I'm a non-programmer and everything I ever experienced which has the poorest shittiest performance in existence was based on JavaScript.
The fucking RPG Maker MV which is the first RPG maker using Javascript as a whole, has the worst game performance that bricks not only old computers but also kills the performance of new ones, regardless of game or programmer, across the board.
We are talking 2D JRPG shit with static images from the god damn SNES/PS1 era that runs worse than a full-fledged modded 3D game like Skyrim created by one of the worst coders in the gaming industry known as Bethesda, simply because of Javascript. We are not even going into website territory regarding arguments, since any PHP shitsite wins in performance over JS.
That's how absolute piss shit this language is and the world is better without it.

PHP is fine if all you need is traditional dynamic webpages served up the old CGI way. Thankfully, that niche is still gigantic and works well enough for 99% of websites.

I'm not so sure that I would recommend PHP to a newcomer, but I'm not really sure what other language I could recommend with a straight face that serves that niche better. The language is fast as hell, deploying it is dead simple, and there are a massive number of libraries and frameworks out there for you to use.

Just stay the fuck away from Wordpress. Something about it seems to induce brain-damage in the developers in that ecosystem - it's like they're stuck in the previous decade and don't know anything about common web vulnerabilities, defensive programming or modern PHP (>5.3) features.

I would say you're supposed to use JS sparingly for actual dynamic fuctionality, but then I'm getting old and the kids will die if there isn't some spinning piece of CPU-bricking distraction on the screen.
Mobile-first design is bestowing us with sites that gay little mobile-emulating animations, UX&XP with it. Fuck this gay earth.

but AJAX. i guess boomers are fine with hitting the refresh button but AJAX is crucial for modern web interfaces

Anyone who uses PHP is going to use a framework like Laravel or Symphony so its going to be exactly like programming in Rails.

The only people who use vanilla PHP are people who maintain legacy websites. No one with a brain is going to start a new project using PHP.

It cracks me up how PHP shills will use Wordpress as an example of PHP marketshare when the whole point of Wordpress is to shield you from the code. Most web developers who use Wordpress have never even looked at PHP code. Also Wordpress was first made in 2003 when PHP was the only option for backend programming.

Frameworks are the reason why PHP will last decades to come while autistic NEETs still cry about "php is ded XD"

yeah, autistic NEETs just like those guys who cry about “COBOL is dead!”

Facebook actually have a weird system:
They develops in PHP, transcode it into C, then deploy it as a blob

how is it a piece of shit? assuming your business requirements force you to opt out of node why not pick php over rails, .net, or java?

>any year
>any century
>any universe
>defending php
Mark pls leave

Attached: ASxdrrF.png (1022x187, 23K)

I think the real question isnt why it's shit, it's why does anybody even use it at all? A friend of mine is working as a webdev in a small company and they are still 100% invested in PHP. He still can't really explain to my why they haven't changed long ago. Something about muh Typo3 templates or whatever nonsense they come up with.

Nobody needs to know C anymore boomer

>why they havent changed

-It werks
-There are lots of php devs
-Tested over 20+ years
-Many frameworks
-Other languages are just marginally faster, but who cares this is not rocket science

That would be a sound argument if Javascript didn't exist.
Sadly Javascript exists.

Because you're a dumb fuck, that can't read docs.

Fine, but how could you prefer PHP over something like JVM, .NET, Golang, Python, Ruby or even JS for that matter? PHP is an absolute shitfest and was from the beginning. I think the only reason it ever got any kind of adoption was because hosting providers had it as cheapest option. So I guess many hobbyists used it and then became professional webdevs over time with it.

it works, it's easy to deploy (any web server support PHP), easy to find devs (so easy to maintain), and there are a shit ton of frameworks, CMS and tools that uses PHP (in production, you will almost never do anything from scratch).
To name a few:
>Symfony
>Laravel
>Zend Framework
>Wordpress
>Joomla
>Drupal
>Magento
>Prestashop
>PHPMyAdmin
>Matomo

and please, it's by far the most used web back-end langage, you must be either a fucking hipster or a very autistic neet to ignore it.

Attached: file.png (570x340, 42K)

Is ASP still a thing?

Im working on a site atm and we use Laravel. Its so easy to use. I dont get the hate.

>it's by far the most used web back-end langage
I have no idea where you get that idea, but at least when you filter out all private user "homepages" of fucking 13 year olds from twenty years ago and maybe some static profile pages of fucking construction companies, it's absolutely meaningless these days. Java is still by far the industry standard for web backend in serious companies.

Why change? If you're still developing traditional CGI-style dynamic websites, there's not a lot to be gained by switching to other languages just to do the same damn thing you were doing beforehand. It's not some albatross, the language is still very much alive, with active development on the core and a thriving library ecosystem.

That goes the other way too. If you're programming Django or Rails or Flask or whatever and you're already comfortable with it, I'm not going to be beating down your door to try and get you to switch to PHP. Now if you want somebody to make fun of, go find someone using Node.JS to serve up nothing but traditional dynamic HTML pages.

PHP gets a lot of hate from elitists who have to justify their discipline or people who have worked with a vanilla PHP codebase. There is a *lot* of bad PHP out there. I'm currently one of the lead developers rewriting our business management suite in PHP 7 and I'm honestly very pleased with it.

It's been a meme to hate on PHP for years and rightfully so. But it pretty much redeemed itself since 7.0 and only got better from there on, but most people didn't get the letter, and continue showing the rest of us how fucking stupid they're. Most often it's people who never coded in PHP, or hipster CS students who know shit about actual business practices.

I have a webdev licence and we did a lot of php and very few Java, and in internship I don't know any classmate who wrote a single line of Java