PHP was written in the C programming language by Rasmus Lerdorf in 1994 for use in monitoring his online resume and related personal information. For this reason, PHP originally stood for "Personal Home Page".
What infuriates me the most about PHP and its community is that with every major version bump, they say "We can't change that, we have to maintain compatibility with legacy code!", and yet in the very same sentence explain "Of course upgrading to a new major PHP version would break something! That's obvious, isn't it?"
@@talkysassis That's not my point. My point is that PHP refuses to fix its awfulness in major releases, specifically citing that the language has to remain backwards compatible - while at the same time not being backwards compatible.
@@MechMK1 For every change it is a cost-benefit calculation. In PHP it used to be the case that any unrecognized token was assumed to be a string. So if you made a typo and wrote flase where you meant to write false, PHP implicitly turned it into the string "flase". This behaviour has been removed and that breaks backward-compatibility. But they decided it causes more bugs than it is worth for backward-compatibility. In other cases like inconsistent parameter orders for related functions it is deemed too impactful to break backward-compatibility for how much is gained. At least that's how I understand it.
IDK, I use PHP for over 10 years and it does its freaking job. I tried a number of different other languages/frameworks over my career but I always prefer to use PHP when it's possible. I have small-to-medium apps and services running on PHP on, low-resource (read cost-effective) servers that are proving extremely valuable for businesses. Every language has its strengths and weaknesses, so it's not about the language, it's all about you using it to solve a problem efficiently and making your code easy to read and maintain by other devs.
I used Laravel, and to be frank, I liked it, I did not find any reason to hate it, I switched since then but only due to market demand but the framework itself is pretty good. I hate JavaScript tho, though it feels like it was forced to do things it was not designed to do, of course, it's the main language in frontend dev but, whoever got the idea of introducing such language to the backend must face the consequences of his actions.
Actually, the stat of so many websites running on PHP is probably because most languages don't announce themselves through the 'Server' or 'X-Powered-By' HTTP headers like PHP does. Most sites will at most show 'Apache' or 'nginx' and their respective version/OS depending on the configuration. But since there are a shit ton of WordPress sites, and they all announce PHP...
IMO what helped PHP a great deal is it's stateless execution allowing to simply access the current request informations through globals or easily accessible context.
My "favorite"part of PHP is the function return type inconsistencies. You expect string but it can also return false, null. Even core PHP functions do that.
Once again, funny slander but impossible to read. The viewer's experience right now: stop the video, so that you can read, resume for few seconds until a new thing is in the screen, stop the video so that your can read, etc so on until the end, really really user un-friendly
I did much prefer using php's syntax over js in uni but as soon as you want to do something advanced or performant php just kind of falls over and dies. Kind of sad, I wish it was better. It's kinda like playing a game's demo and really loving it only to discover that the demo is two thirds of the game and the ending is missing.
I like php for its simplicity and ease of use. Not to forget exchanging data between backend and frontend is so much easier. But it's performance really scks ass. I wish to switch all my projects to different backend (probably node) But it will be so tiring now...
@@HarshRajAlwaysfree > exchanging data between backend and frontend is so much easier Now I haven't done much PHP, but from what I saw and from what I was taught in security classes you can't really have both simple code and any basic amount of security in PHP...
I recommend everyone to read "A fractal of bad design" by Evelyn Woods (eevee). It's the ultimate PHP slander! But it's old, so it no longer applies 100% to newer versions
I love php and use it all the time. It is a good language for web apps. Idk why y'all so angry about it. You don't like it, fine....dont worry about it and move on with your meager lives ffs. I hate scratch but im not on a scratch video talking trash about it. Zuck wrote FB in php in a day and it is still holding up just fine and very secure.
It's just syntax. No real programmer would hate a language for such a small syntax quirks. Otherwise Haskell would be the worst language of the century.
@@bigzigtv706 yes, but these are really small and easy to remember things. Putting a dollar sign before variable shouldn't be the reason to hate the language (though that's not even exclusive for PHP, many langs have this "feature"). There are of course esolangs, where the syntax is messed up so much, that it actually makes the "development" really hard, but relearnig PHP syntax is not a valid problem. As I stated in the other of my comments under this video, people don't actually have a reason to hate PHP. It's just cool and trendy to do so.
PHP is one of the few general purpose programming languages that don't need exceptions. Change my mind P.S. Google said years ago that PHP won the Internet :D
I'm php developer and i work with legacy codes once i was make a maintenance on code and i found this: $query = "select nome, sobrenome, cargo, from funcionarios where funcionario_id =". $_GET["funcionario_id"] ; If you know minimal about security you'll understand
I'm working on a legacy code rn and I see this EVERYWHERE! I'm not even an expert at PHP and started learning PHP when I started working on this project but I still know that this is a very bad practice. Before starting on a project it literally takes a few minutes to find out the best practices.
Keeping the hate aside, PHP + Laravel is quite a good choice for your web app. It is one of the most well documented backend frameworks I have ever seen and it has a TON of documentation, users, and features...
The only reason why I don't use anything but PHP is that every other web app needs its own freaking port nonsense and needs to always be running. With PHP, it doesn't matter how many PHP web apps I have, they all require the same MySQL database and very similar nginx configs, meaning it takes almost no overhead other than PHP itself to run them
You need a webserver to run requests for you, which needs a port Making a single reverse proxy is faster than setting the 300 webserver variables and header settings needed for some php shit to work (in the same exact damn file)
The reason why I avoid PHP is because every single request requires a full freaking process or thread to handle it, which is really expensive and only somewhat mitigated by external thread/process pools like PHP-FPM. It also requires that CGI nonsense in my nginx configs, whereas for every other language I just use my trusty proxy_pass nginx config, which is pretty similar every time.
I think he means that while some functions throw exceptions on failure, others like file_get_contents just return false. There are also "errors" which existed before exceptions, and can only be handled by using set_error_handler.
@@kebien6020 Oh yeah, that. I don't use PHP enough so i didn't realize that some functions just return false. That makes more sense. Not even the actual PHP functions have a consistent way god damn
@@sodiboo plus you can't even do consistent comparisons on the return value. for example, if you get NULL back from a function, NULL < -1 but also NULL == 0. and let's not even think about why "61529519452809720693702583126814" == "61529519452809720000000000000000" (remember these are _strings_ we're working with - see PHP sadness #47 for more context.)
Some functions return false when they fail. However those same functions can also return 0. Because of how PHP does equality, 0 == false which makes is means your program could accidentally think it failed when it actually succeeded.
PHP is the best programming language in the world to explain why you should use a different programming language for your website... Yes, I have written an entire website with PHP and I ain't doing that again.
fun fact: theSTEMgamer actually spends 100 hours a day for 2 weeks learning every language he makes a slander video on because he's so dedicated to accurately slandering languages
bruh my man absolutely SNAPPED on this lmao 0:10 this shit is so real, i bet you literally just copy pasted it from someone saying this exact same thing on a post somewhere 😂
Is there really so many frameworks? Or is this a joke that theres only laravel from good ones? (I dont say that, i dont know). I encountered a website "made with a framework", and the framework was some obscure sh t, so i would gyess the first, but how many is there?
you missed out on some other low-hanging fruit like the inconsistency of the == and === operators and implicit type conversions. but anyway, making fun of php is like drop-kicking a baby, it's too easy. i would even go as far as to say, anyone that writes php code is not a programmer - i'd even call someone who only knows html + css a programmer before i call a php'er one. you should do haskell next :)
@@septanesium Learn D and help me make Nemesis if you want to kill time. At leas you'd do something useful and you'll actually use Nemesis in the future as it's gonna be the best language ever!
but php is not "worse than javascript and web assembly" because it's not a frontend language, it's basically just a web framework. - me, who's made many things in php a while back
JavaScript can be used as a backend too (not sure about Web Assembly, but probably not, because who the hell would use it for backend, it makes zero sense)
All PHP developers are greedy for money, otherwise I can’t explain why I see dollar symbols in almost every line of code
lmfao
Can say the same for JQuery guys?
Also Perl moment
@@infienite9215 what? the guys who've been frozen in time for >7 years
You should see those bash dinosaurs!
I saw a .php file once
"It was like staring to the dark void."
@Jul W he ded.
I'm forced to see them in huge amounts bc I have to make a fullstack project using php, I'm traumatized
The thing is that the best argument for learning php because is widely adopted, is more of a criticism toward most of internet infrastructure.
legacy code checks out
You could claim literally the exact same thing for JavaScript tho.
And people do.
Almost everything web-related sucks.
PHP was written in the C programming language by Rasmus Lerdorf in 1994 for use in monitoring his online resume and related personal information. For this reason, PHP originally stood for "Personal Home Page".
P[Personal Home Page] Hypertext Preprocessor
Php hypertext processor, recursive acronym
Yup, these guys thought they can hide historic facts from the public
Too bad the recursive thing makes doesnt make sense at all
Nice recursion with one depth...
php hates programmers
What infuriates me the most about PHP and its community is that with every major version bump, they say "We can't change that, we have to maintain compatibility with legacy code!", and yet in the very same sentence explain "Of course upgrading to a new major PHP version would break something! That's obvious, isn't it?"
Unfortunately, majors can break code just fine
Only minors are required to keep things working
It is bad practice, but it's not wrong
php has a community???
@@talkysassis That's not my point. My point is that PHP refuses to fix its awfulness in major releases, specifically citing that the language has to remain backwards compatible - while at the same time not being backwards compatible.
@@MechMK1 For every change it is a cost-benefit calculation. In PHP it used to be the case that any unrecognized token was assumed to be a string. So if you made a typo and wrote flase where you meant to write false, PHP implicitly turned it into the string "flase". This behaviour has been removed and that breaks backward-compatibility. But they decided it causes more bugs than it is worth for backward-compatibility.
In other cases like inconsistent parameter orders for related functions it is deemed too impactful to break backward-compatibility for how much is gained. At least that's how I understand it.
@@talkysassis that's assuming php uses semantic versioning which they apparently don't (at least they didn't in the 5.x days)
IDK, I use PHP for over 10 years and it does its freaking job. I tried a number of different other languages/frameworks over my career but I always prefer to use PHP when it's possible. I have small-to-medium apps and services running on PHP on, low-resource (read cost-effective) servers that are proving extremely valuable for businesses. Every language has its strengths and weaknesses, so it's not about the language, it's all about you using it to solve a problem efficiently and making your code easy to read and maintain by other devs.
I used Laravel, and to be frank, I liked it, I did not find any reason to hate it, I switched since then but only due to market demand but the framework itself is pretty good. I hate JavaScript tho, though it feels like it was forced to do things it was not designed to do, of course, it's the main language in frontend dev but, whoever got the idea of introducing such language to the backend must face the consequences of his actions.
PHP advocate: 8 out of 10 websites run on PHP!
Security experts: About 8 out of 10 websites have security vulnerabilities by our estimate
Actually, the stat of so many websites running on PHP is probably because most languages don't announce themselves through the 'Server' or 'X-Powered-By' HTTP headers like PHP does. Most sites will at most show 'Apache' or 'nginx' and their respective version/OS depending on the configuration. But since there are a shit ton of WordPress sites, and they all announce PHP...
Please do Slander Slander. I would pay good money to see that.
TheSTEMGamer Slander would be great too.
@@kebien6020 TheSTEMGamer on their way to advocate Rust and FP in general
Can't wait for Slander Slander Slander
@@wyvernallow Stack overflow.
PHP also known as the instant legacy language
Isn't that java?
@@AByteofCode which one goes legacy faster?
Python goes legacy really fast too.
Any code that's not written in Rust is legacy instantly.
@@kibe2134 but it’s nowhere near as comparable to Java or PHP
PHP means Partially Hot Potato
Another meaning: PHP elephant like syntax (🐘=PHP) ((just a joke))
mf started writing lisp at the end
PHP means Potential Hazard Programming
@@DailyDoseOfCCP 😂😂😂
Oh its just a joke thank god. That would have been way out of line otherwise.
"Personal Home Page" slander
even the language's name makes fun of itself lmao
IMO what helped PHP a great deal is it's stateless execution allowing to simply access the current request informations through globals or easily accessible context.
Rasmus Lerdorf is actually the biggest troll of IT
Why?
I studied php this year and I enjoyed it ngl.
Probably because I still didn't use it in complex projects
I decided to bind ".." as "->" to ease my pain when using Laravel
This video pretty much explains I went through I was "taught" php during school. PHP is the reason why I left school and dropped my CS degree.
Php has a lot of problems, but being a difficult language is not one of them. I'm sorry to read that.
My "favorite"part of PHP is the function return type inconsistencies. You expect string but it can also return false, null. Even core PHP functions do that.
Once again, funny slander but impossible to read. The viewer's experience right now: stop the video, so that you can read, resume for few seconds until a new thing is in the screen, stop the video so that your can read, etc so on until the end, really really user un-friendly
i was able to read it fine but then i have been using Rust since before the little-publicized community schism involving 128 bit integers
If you switch to Rust you will be able to read this perfectly fine
Php's syntax and power is as strong as an elephant
@The Mystic Savages bruh..
PHP version 7 & 8 are decent. Sprinkly in a little Laravel to make it good. Anything before version 7, let the hate begin.
I will completely agree there. I love 8
php programmers when consistency and scalability (they're scared of scalable infra)
That is why it should only be used for small business with zero growth potential. Flower shops, neighborhood bakeries, small size consulting firms.
I love PHP more than any other language BUT only for simple yet kinda complex stuff
I thought this is 1:33 hours long not minutes
when haskell slander?
a monad is just a monoïd in the category of endofunctors what's the problem
Can't slander monads that are monoids in the category of endofunctors
@Jul W nope
Potentially Hazardous Piglets
I did much prefer using php's syntax over js in uni but as soon as you want to do something advanced or performant php just kind of falls over and dies.
Kind of sad, I wish it was better. It's kinda like playing a game's demo and really loving it only to discover that the demo is two thirds of the game and the ending is missing.
I like php for its simplicity and ease of use. Not to forget exchanging data between backend and frontend is so much easier.
But it's performance really scks ass. I wish to switch all my projects to different backend (probably node)
But it will be so tiring now...
@@HarshRajAlwaysfree > exchanging data between backend and frontend is so much easier
Now I haven't done much PHP, but from what I saw and from what I was taught in security classes you can't really have both simple code and any basic amount of security in PHP...
I recommend everyone to read "A fractal of bad design" by Evelyn Woods (eevee). It's the ultimate PHP slander! But it's old, so it no longer applies 100% to newer versions
I love php and use it all the time. It is a good language for web apps. Idk why y'all so angry about it. You don't like it, fine....dont worry about it and move on with your meager lives ffs. I hate scratch but im not on a scratch video talking trash about it. Zuck wrote FB in php in a day and it is still holding up just fine and very secure.
We need Haskell
I liked php when I studied the basics in school, but after working with Symfony I made it a priority to never get a job in PhP.
Why? Symfony is probably the best php framework
Php argument, if you would travel in back in time to 2000s by accident, and would have to find a job in web dev, php would be a great choice
The description though...
PHP more like Pulverized Hate Processor
Prototype Hostility Producer
I almost got a job in PHP. Thank fuck that didn't work out.
I just hate PHP because I have to write a dollar sign before every variable. Also underscore function naming though 😒
It's just syntax. No real programmer would hate a language for such a small syntax quirks. Otherwise Haskell would be the worst language of the century.
@@alexzhukovsky8361 mfw no thought goes into developer experience
@@bigzigtv706 yes, but these are really small and easy to remember things. Putting a dollar sign before variable shouldn't be the reason to hate the language (though that's not even exclusive for PHP, many langs have this "feature"). There are of course esolangs, where the syntax is messed up so much, that it actually makes the "development" really hard, but relearnig PHP syntax is not a valid problem. As I stated in the other of my comments under this video, people don't actually have a reason to hate PHP. It's just cool and trendy to do so.
You would have really hated BASIC; you put $ after string variables (and functions!), % after integers, and ! after floating point!
@@alexzhukovsky8361 haskell's syntax is really nice though
The only real argument for PHP is that it's a good challenge to write in
C# slander but it’s just the Java slander video
But with more properties and other syntactic sugar!
css slander would be goıd
Haha the SQL sanitization is too real
Inspiring video
> PHP devs when the PHP interpreter source code got compromised
Ah yes, our first programming language 😅
PHP is one of the few general purpose programming languages that don't need exceptions. Change my mind
P.S. Google said years ago that PHP won the Internet :D
That's just a testament to how much the internet infrastructure and distributed programming resembles scrambled eggs
@@SplitWasTaken Not a problem, all we like scrambled eggs :D
somewhere in an alternate universe you will find your missing ?>
I'm php developer and i work with legacy codes once i was make a maintenance on code and i found this:
$query = "select nome, sobrenome, cargo, from funcionarios where funcionario_id =". $_GET["funcionario_id"] ;
If you know minimal about security you'll understand
Bobby tables' mom just waiting for her son to become a functionary in this organization
God help us all
I'm working on a legacy code rn and I see this EVERYWHERE! I'm not even an expert at PHP and started learning PHP when I started working on this project but I still know that this is a very bad practice.
Before starting on a project it literally takes a few minutes to find out the best practices.
@@alaapsarkar It's hard you learn php on the right way the documentation is a mess
I'm not a php dev, what happens in this query?
Keeping the hate aside, PHP + Laravel is quite a good choice for your web app. It is one of the most well documented backend frameworks I have ever seen and it has a TON of documentation, users, and features...
For PHP version 7 to 8. Pre-version 7, not even Laravel can save it.
YOOOOOO YOU SHOUTED OUT PURESCRIPT THAT'S MY DUDE THERE
The only reason why I don't use anything but PHP is that every other web app needs its own freaking port nonsense and needs to always be running. With PHP, it doesn't matter how many PHP web apps I have, they all require the same MySQL database and very similar nginx configs, meaning it takes almost no overhead other than PHP itself to run them
You need a webserver to run requests for you, which needs a port
Making a single reverse proxy is faster than setting the 300 webserver variables and header settings needed for some php shit to work (in the same exact damn file)
Just use an application server lol
The reason why I avoid PHP is because every single request requires a full freaking process or thread to handle it, which is really expensive and only somewhat mitigated by external thread/process pools like PHP-FPM. It also requires that CGI nonsense in my nginx configs, whereas for every other language I just use my trusty proxy_pass nginx config, which is pretty similar every time.
I have backends for Web-based intranet apps done in both PHP and Python. Both work fine via plugin modules in Apache. But I prefer Python.
0:34 PHP has exceptions though, does it not? or do you mean for all the native bindings that have various weird last error functions?
I think he means that while some functions throw exceptions on failure, others like file_get_contents just return false. There are also "errors" which existed before exceptions, and can only be handled by using set_error_handler.
@@kebien6020 Oh yeah, that. I don't use PHP enough so i didn't realize that some functions just return false. That makes more sense. Not even the actual PHP functions have a consistent way god damn
@@sodiboo plus you can't even do consistent comparisons on the return value. for example, if you get NULL back from a function, NULL < -1 but also NULL == 0. and let's not even think about why "61529519452809720693702583126814" == "61529519452809720000000000000000" (remember these are _strings_ we're working with - see PHP sadness #47 for more context.)
Some functions return false when they fail.
However those same functions can also return 0. Because of how PHP does equality, 0 == false which makes is means your program could accidentally think it failed when it actually succeeded.
@@thestemgamer3346 that is the epitome of cringe
The dynamic syntax in php is a pleasure to write tho for someone who came from C and C++. I can give it that.
how on earth this can be pleasure after c/c++?
PHP is the best programming language in the world to explain why you should use a different programming language for your website...
Yes, I have written an entire website with PHP and I ain't doing that again.
I just freaking shat myself when I saw this notification
perl slander when
up
This says a lot about the alti-video community.
i just want the damn ide / text editor slander
@The Mystic Savages never enough
fun fact: theSTEMgamer actually spends 100 hours a day for 2 weeks learning every language he makes a slander video on because he's so dedicated to accurately slandering languages
next Perl
up
Next? Assembly. Good luck
Cool, but we are Rustaceans, so goland when? (lol no generics)
Up next: H a s k e l l
What is this amazing music
beautiful
APL slander lesgooooo
php not being to disable arrays in query strings (like `/x.php?foo[]=bar`)
PHP just werks
KOTLIN HAS NO SUCH TRICKERY LMAOOOO
Good one!
bruh my man absolutely SNAPPED on this lmao
0:10 this shit is so real, i bet you literally just copy pasted it from someone saying this exact same thing on a post somewhere 😂
ironically it's a quote from rasmus himself, which is a bit embarassing in hindsight
@@LC-hd5dc bruh
Til about purescript and how cool it is.
Make Lua slander next
Objective-C devs when blaming PHP for it's bad syntax:
Do Visual basic 6.0
Do MATHLAB
Do ............
pls do c# slander next
This hurts as a student🥲
That means, you (also) forgot to sanitize your sql queries
@@ariel._.9186 don’t burn me even more lmao
Is there really so many frameworks? Or is this a joke that theres only laravel from good ones? (I dont say that, i dont know).
I encountered a website "made with a framework", and the framework was some obscure sh t, so i would gyess the first, but how many is there?
Checked with google, there is indeed a lot
Wikipedia lista like 40 xdd
Where is the music from?
you missed out on some other low-hanging fruit like the inconsistency of the == and === operators and implicit type conversions. but anyway, making fun of php is like drop-kicking a baby, it's too easy. i would even go as far as to say, anyone that writes php code is not a programmer - i'd even call someone who only knows html + css a programmer before i call a php'er one.
you should do haskell next :)
thanks
how about visual basic slander lol
❤❤❤❤
could you do css slander I think it would be great (even if it is not a programming language)
It would mostly be about centering a div
Haskell slander when?
Who tf sanitize SQL query when you have prepare statements 😂
Next Make on qBasic or assembly language
I NEED MORE PROGRAMMING LANGUAGE SLANDER! NOOOOOOOOOOOOOOWWWW
👍👍!
SQL slander?
"What happens when you trust user input"😂
Okay, since this is a PHP video, can someone tell me if there is a legit use case for the variable variables?
as a haxeflixel user i want to be insulted
Please do Go Slander 🤣
I use php daily and to be frank it is better than js crap, they have strong typings as well now yum
Imagine unironically using PHP...
I'm ngl the other day I ironically learned php to kill time knowing damn well I'm never gonna seriously use it
@@septanesium Learn D and help me make Nemesis if you want to kill time. At leas you'd do something useful and you'll actually use Nemesis in the future as it's gonna be the best language ever!
I actually like programming in PHP, is My favorite lenguaje besides Ruby.
@NeidenAtron As long as you're happy with it, I'm happy for you! ❤️
@@godnyx117 Thanks!!.
but php is not "worse than javascript and web assembly" because it's not a frontend language, it's basically just a web framework.
- me, who's made many things in php a while back
JavaScript can be used as a backend too (not sure about Web Assembly, but probably not, because who the hell would use it for backend, it makes zero sense)
@@r.t.5767 The video is comparing the base languages.
Do Scratch slander
make DevOps slander
PHP aka Pile of Hot Poop when Bobby Tables walks in *sweating perfusely*
Swift slander 🥺
CS Grad Dropout "php bad" Slander when?
Thankfully, PHP 8.3 has ?: nonassociative. In a while they'll make it right associative.