I started my career with PHP, 5 years ago and even if I now work primarily in Go, I still keep up with all the new features. It's still massively useful to me for small websites and other minor projects.
Work has pushed me from php to go... Haven't worked much with go, but so far I think... php is light years better for web dev, and likely in general. Jesus Christ no ternary... useless vars and statements FTW... what a load of bs....
I actually got my first job in PHP 10 years ago and since then jumped around using, JS, GO, Python, C# and today I work for a company who uses PHP. Its definitely not dead.
I sometimes wish I hadn't missed out on PHP when it was popular. I got into web dev with React around 4 years ago. It sometimes feels like the Node ecosystem is finding increasingly convoluted ways of reinventing PHP.
leave it. learn ruby with rails (full stack mvc), sorbet (statical types) and hotwire (SPAs, animations etc.), or elixir with phoenix (also full stack mvc) and liveview (SPAs...). laravel has something similar btw, livewire for SPAs. javascript and node have chaotic ecosystem, in time dependencies grow into unmanagable and unreliable mess. also, react has insane update rates. both problems will result in burnout. aside from javascript being javascript. Learn serious framework written in well designed language. The 3 i have mentioned are fullstack, meaning that you can use them to build frontend and backend, APIs, CMSs, SPAs and so on. With wasm the possibilities are endless. And if you want to have knowledge about client-side apps, learn Angular - stable, mature, consistent. And there are 2 version for different usages. One written in Typescript, the other in Dart. oh, and do not be a fullstack at work. You will have 2 times more responsibilities than front or backend dev. If front-end -> Angular, Dart, maybe Flutter and Unity if you want mobile apps, games, interactive movies. If backend -> Rails, Phoenix (the advantage is concurrency/parralelism and functional, not object-oriented paradigm, contrary to the rest options) or Laravel (or Symfony). That is, if you want to stick with web development. If operating systems and desktop apps would be more interesting -> C and Rust, maybe Zig but start with Nim, Crystal or Go to be comfortable with compiled languages and different memory management methods and garbage collection styles. If big data, machine learning, computer science and AI -> Python, Julia, Matlab, R and Ocaml. Python and Julia are the easiest, Ocaml is as difficult as Rust. Do not touch the JVM ecosystem, it is a mess comparable to node case.
To me who started on PHP around 2012 and continued using it until around 2017 and moved to React it seems that PHP of today is also finding ways of reinventing JavaScript, which I don't see as a bad thing. We learn and we grow collectively from each other and somewhere around year 2100 we'll have one language to rule them all.... but to my experience it will end up competing with every other language and these wars will continue. :D
from someone who went from c# to php, and saw all those changes from php 5 to 7 and now 8, this language is gathering its fast application on market alongside with the goods that comes with statically typed languages. Absolutely amazing work from the PHP team!
if you use PHP and talk of speed, you are in wrong application area :D also, xeons and memory these days are cheap, add as many cores as needed. 2004 PHP was struggling, not anymore.
True, many of them. But PHP started as a scripting language to create dynamic web pages. It was initially developed by Rasmus Lerdorf in 1993. Rasmus was not an expert in compiler design. C#, instead, has been designed by Anders Hejlsberg, who created Turbo Pascal, Delphi, and then eventually moved in Microsoft when he first built a Java compiler, and then he made C#, and most recently Typescript. Hejlsberg is one of the most influent compiler designer. That why C# used to be so much better.@@nikolaslijepcevic
Great video! It's been quite some years since I worked with PHP, happy to see it has adapted a lot of the features, I enjoy in other languages (C# and Typescript). Keep up the good work
I'm coming from the Java world and started learning PHP for a future personal side gig, and after reading about PHP 7 and 8, I'm excited about it. I chose PHP over NodeJS because I didn't want to deal with NPM hell.
😂 remember when PHP 4 slowly made it to virtual hosting machines and broke everything so you had to rename files .php3 for them to be ran through the php3 interpreter 😅
@@nimmneun yeah I remember it well, there were a few episodes like that through the years but each one brought more understanding of the architecture, I'm happy it taught so much
Dude, I feel like I am quite on the edge using PHP8.1 and stuff for quite a long time but even I learned something thats cool AND useful to me (usually it's just cool). Great video!
I used PHP for work (specifically with Laravel), and I was introduced to 7.4, but when I saw what 8.0 and 8.1 had, I knew PHP was a competitor. I would still likely not choose it, but it's definitely on par with modern languages in my opinion. Thanks for making this!
For huge number of requests you can use the Swoole extension where you get a Node-like webserver continuesly running and processing requests with an event loop. At one place I even had to introduce sleeps in the microsecond range as the database was not fast enough to keep up with changed data.
@kwinso I avoid JS like the plague. Unfortunately JS is the web's programming language but if I can do it without Javascript, I'll do it without Javascript
I have used PHP. I had to make my own PHP framework to make the language remotely usable. It fucking sucks. The only usable thing about PHP is that it’s Turing complete, but hey so is brainfuck.
Php continues to get the job done! Something else that's a "newer" addition I love...using First class callable syntax, often in place of where I may have a verbose arrow function callback. Places like collections, array methods, or even when you need a callback to bind a class into the container.
I've been using PHP for my job for the last 14 years or so, I try to keep up with the version updates but so often forget what's possible because I'm so used to old school PHP. I learnt a completely new one from your video though, I did not know you could pass key: value named parameters to functions that's amazing! 😲Also had forgotten about the match() function instead of switch statements which is beautiful.
I'm switching jobs. After about 10 years of PHP I worked with Java for almost 5 years and soon back to PHP. I'm excited to use this modern and useful syntax!
An interesting overview of new things! But what made me dislike PHP back in the day isn't so much what it lacked, but the weird things it DID have. I'd be very interested in a video about what ISN'T in modern PHP... what are some things that were bad that nobody uses anymore (even if they're technically in the language)?
Gone entirely or indeed so rarely used that they might actually be gone: non-numeric strings comparing equal to 0, eval, register_globals, magic quotes, open_basedir, a lot of the headaches with different character encodings (UTF-8 is now the [sane] default everywhere), the mysql extension (all mysqli now), the "each" function (the foreach construct makes much more sense)
It really is a slow process to get things removed from the language, as that will usually prevent someone from just upgrading. However, there was a big game changer: Composer dependency manager.
Small correction to your array destructuring segment: No, you didn't have to manually declare seperate variables and then access by index. Long before that was a feature, PHP shipped with the list() function which does essentially the same thing only slightly more verbose
$info = array('coffee', 'brown', 'caffeine'); // Listing all the variables list($drink, $color, $power) = $info; echo "$drink is $color and $power makes it special. ";@@mibrahim4245
True, but list is fussy. You can only use it with indexed arrays, and you don't have much control over which elements to extract. List: $array = [10, 20, 30]; list($foo, $bar, $cat) = $array; echo $foo; // Outputs: 10 echo $bar; // Outputs: 20 echo $cat; // Outputs: 30 Destructuring: $array = ['a' => 10, 'b' => 20, 'c' => 30]; ['c' => $foo, 'b' => $bar] = $array; echo $foo; // Outputs: 30 echo $bar; // Outputs: 20
I was in a meeting with a senior developer with over 15 years of experience. He commented: "It is bad, slow, untyped, and a poor language for script kiddies.' In response, I asked, 'Which version did you try?'" Senior dev: "3" Some people...
I author Raylib-PHP native extension, Raylib is a game library for Windows, Linux, macOS, Raspberry Pi and Android. Two items left out is JIT and FFI :). On my M1 Mac Mini it's almost on par with NodeJS, with JIT enabled, in my unscientific test it was about 10% slower, for moving and rendering 100,000 sprites on a screen (44 FPS NodeJS vs 41 FPS PHP with JIT). FFI is critical to let people consume shared libraries .dll, .dylib, .so files in PHP without needing to write low level C code. For Raylib, that comes at a performance hit, which is why I still write C interop PHP bindings. There are still some holes in FFI, i.e setting up native C callbacks is not supported on all platforms and leaks memory.
I love that this is JUST talking about PHP. The language itself has grown so much, and this video doesn't even touch on the fantastic ecosystem, the best package manager around (composer), frameworks like Laravel, etc.
Two little known superpowers of PHP are: Arrays and CLI. First, the PHP array (hash table) implementation is unique among all programming and scripting languages: Integer and string keys in the same data structure while _maintaining order of inserted items_ when iterating over the array and yet having O(1) for all operations. Second, PHP CLI allows for _system development._ Sure, you can run PHP CLI from cron jobs but you can _also_ develop and deploy root level, always-on system services that start with the OS at boot. Throw in PHP extensions (e.g. via PECL or roll your own) and you can expose any C library or system call to PHP CLI userland.
Most of these have been implemented in other languages, so I'd be still sticking to Typescript. But the sensitive variable stuff is very intriguing, not going to lie.
First impression: PHP became a Frankenstein's monster because it mixed and matched a ton of features of at least half a dozen other languages. But of course languages seem to converge more and more, it's interesting to think about when are they going to be so similar that they would stop multiplying like they keep doing at the moment.
one decisive factor is the ecosystem: laravel symfony and apiplatform... very few (if any ?) backend oriented languages have such a strong ecosystem when it comes to productivity, 8.2 + those tools = the best backend developer experience out there
@@bilp_bloup_bot I'm not an expert at web app backend development so bear this in mind when you respond: what's your opinion about Python and its related "ecosystem" with respect to backend development experience? Isn't it efficient/straightforward/mature enough?
Amazing. Was working with PHP for years, but it's almost 10 years ago. Now I see that it is evolving as every other language and for me it looks like all languages are coming closer to each other providing same tricks and shortcuts for us :)
Really well-made video. It demonstrates how PHP caught up with TypeScript in a lot of ways. This is incredible news for PHP developers. The reason I feel PHP isn't very relevant today, however, is that I don't see any reason why someone would switch from TypeScript/Kotlin/Python to PHP.
Considering that 80% of all websites run on PHP, I'd say that PHP is the most relevant of all. The RUclips influencer bubble gives a skewed perception of reality. In the real world, PHP is king.
Python is slow as shit as an application language, Koatlin/Java is proprietary and expensive to run and TypeScript is not even a language. JS is indispensable but a mess of a language.
I have learned Python/Django, javascript/React, Java ( for DSA ), and Golang ( Only the basic, because I want to try it a little). But in the end I want to switch to PHP/Laravel because in my country it's easy to find junior role with this language for full-stack / backend role. (I'm sorry if my English is decreased, and my thought is wrong)
PHP is definitely more relevant than TypeScript or Python for web development. Django and NestJS are solid Python and TS frameworks, but they're years behind Laravel and Laravel has always been one step ahead of them for rolling out new features.
PHP is amazing, and far from dead, PHP is what got me programming at the age of just 9 years old, its languages like PHP that really give people the opportunity to learn programming.
The projects I work on, I built 12+ years ago with PHP. They were performant then. But I've migrated them to 8.2, and I use a skeleton Symfony install (for routing mainly), and they're ready for the next 10 to 20 years. If it ain't broke, don't fix it. Especially don't just move it to the newest, shiniest thing because you can.
I find that PHP is really all I need for most things I build. PHP, Twig and Turbo goes a long way. If I have something more complicated, there's Symfony and Laravel. I do prefer other languages, but just for making a website without much hassle, PHP is the way to go.
Definitely a +1 with the PHP speed, we run a game analytics platform and we easily handle 20-30mil requests per week. It’s nowhere near as bad as people make it out to be
While your points are valid and PHP definitely isn't dead, would be interesting to see a comparison of PHP to the other options to really see if it's worth adding to one's skillset. I feel like a lot of companies are still using PHP because they haven't been able to afford to switch to something else due to having large scale apps. Awesome video :)
If you ask contextless question like „which language is the fastest?” The answer will never be one of the popular languages (zig is the fastest language, Lua the fastest scripting language). Which language is most performant for handling web requests? Elixir/Erlang. What matters much more is the landscape and infrastructure around that language. Here PHP is King in the web application environment, no other language can compete. And nowadays PHP outperforms all other big name scripting languages (except Node).
This is amazing! Thanks for the rundown. Haven't used PHP since 2013 probably, when I was doing WordPress brochure sites. I might just have to try it again someday!
Haters gonna hate....They were saying PHP was gonna die 10 years ago. It's changed so much, continues to grow, has a great, supportive community, and owns how much of the web again? Just Wordpress alone (love it or hate it) is enough said. If PHP is enough for me to make decent cash to support my family... I ride the PHP wave until it crashes. PHP lives on.....
Your way of saying things is so much fun, making this a really fun and easy watch, I have a little comment, it would be nice to just tag every example with a since PHP x version, so we have a reference, thanks for sharing
Thank you Aaron for keeping the PHP flame alive! These new kids think every shinny new toy is better than the last one, they see NextJS and think PHP is dead, when we know that's not the case. I say PHP is years ahead of anything in the NodeJS ecosystem, it's just so bad and needs to mature a lot, the ecosystem and the community around it...
Well problem is there is no job in our country for PHP developers .. well there are some jobs but those jobs are about deprecated code in PHP or moving PHP into some reasonable codebases which are written in .. Java, C# or Python. So yeah PHP is dying .. even my university does not teach PHP anymore.
For pragmatic developers PHP never sucked. If you are in the ideological camp which is fueled by "I know it better" egos - yes - then PHP might have sucked due to its lack of making hipsters happy. I have PHP projects which are 15 years old and there was never any issue with reliability, performance and upgrading. Therefore I am ignoring all that noise of developers who will suffer more and more from the chaos of the JavaScript only approach. And on the server-side PHP is by far the most efficient, performant and economic interpreted language. And not speaking about the huge ecosystem and modern frameworks which have a strong focus to workability and pragmatism.
Btw ... I hope you'll find the chance to do videos a bit more frequently. They are pleasant to watch and there are many cool/modern open source projects to cover ... and PHP is not just wordpress, laravel and symfony 😊
I use PHP 8.2 every day - I thought I was pretty up-to-date on modern PHP, but you've just blown my mind with the null chaining operator. No idea how I missed that!
If you need to handle many requests or in async, PHP Swoole can be used. Also, use load balancers and put as many web servers under as needed. PHP is still scalable in this way 😂. And when the cloud servers starts to get expensive, you can always switch to dedicated servers with 80 cores, 256 GB RAM, 2x4TB nvme disks for 260 EUR per month. Those should be able to eat some req per sec and store some data for ya! 👍
Yeah. I have a side projects where Google decided to send me ~500k additional real users over a couple of days (they suddenly added >100k pages to the Google index) with millions of requests. My little server for that costs less than 50 USD per month and wasn't disturbed at all. Just proper modern code with PHP 8.2 and it ruuunnnns.
I really like when a language improves but I think most of the time you end up working in a 7 years old project that is never updated, I believe that's the reason why devs prefer moving to other language.
The problem is going to be repeated after the 7 years for the application built with new Language too. So it’s not the language which is a problem but the culture of the company is.
there is no way this is PHP??!? yall just looked at JS and thought... huh!! *copies syntax frantically* 🙂 js devs: 🧐👀 am dead! 😂😂 but i love it. I will try PHP.
Wow, first off great video - thanks. Second, I need to look into PHP again (last used it circa 2010 ). Had no idea the improvements. Between this and your Laravel video I'm excited to do some weekend hacking. Installing PhpStorm...
You are such a great communicator! Thanks for the video. Learning PHP right now, and am kind of not understanding why people hate on it, since it seems very capable to me. Of course I haven't really tried any other server side lang yet, but still. PHP definitely gets the job done smoothly. Will be learning JavaScript and Ajax to get client side rendering going on my projects as well. In combination with PHP I cant see a better easily-learned combination of web dev languages
Cool video, there is only on tiny thing missing. Which version provided functionality. I just saw match and found use for it but unfortunetly I'm still on 7.4 in the project and it went with 8.0 :)
You're welcome! I am also enjoying your database course as well and trying to wrap my mind around all the content and improve on my database design and indexing :) Never thought there might be someone better than Jeffrey Way in terms of tutorials, but you're almost there!@@aarondfrancis
I started with PHP 4.2, it's amazing how much the Personal Home Page and evolved. I think the reason a lot of people will say PHP is dead or it sucks is that it's a hip trendy thing to say and sound like you know what you're talking about... Kinda like learning how to do "Hello, World!" or a Sudoku Solver in some new popular language then saying to people you know said language, they're just a bit "Rust-y" not as "Swift" but ready to "Go".
Laravel already won me over but this video seals the deal. "Haven't been paying attention since before 5.4" is exactly me. I only heard about 6 being cancelled and 5.4 bringing some OO stuff and short array syntax when I already had tapped out from PHP for years. I had memorized PHP being slow and bad the same way I had memorized the world population being something like 6 billion. But time moves on and things change. We should always remember to keep learning and not assume the facts we learned to be absolute and unchanging.
Well done, I remember writing PHP a few years ago, used it for a quick website for my wedding and had used it previously for a small church website in early 2000s but it's good to know the language isn't what it used to be.
this channel is going to blow up. i know you are already famous but you are going to be a celebrity. this video was featured in primeagen's channel. keep up the good work. let's convert the devs who use nodejs for backend to php/laravel backend devs
this is such a valuable video, works with me as a refresher, because, I haven't been writing PHP for a while and now back to it. It's fascinating how the community became so progressive post-5, kudos to all the contributors
I come from a PHP background and I still have many friends that use the language. They've been promoting these new features to me as if to say that the language is moving in the "right" direction. While it's very speculative what's the right direction after watching your video I realized that the focus on the language is to add simplicity and functionalities while it does not enforce many(any) good coding practices.
I don't understand how a slew of arcane operators and hipster buzzwords is "adding simplicity". It's reducing key presses MAYBE, but at the expense of maintainability - which is where most of the $ goes in a system's lifetime.
Thanks for this video, it's great! I have never hated on PHP. I loved it and it was my first major programming language (except C++ in high school, but didn't do much with that). JavaScript is my bread and butter now though. I will absolutely still work with PHP and consider it moving forward now that I know the improvements but it'll be extremely hard to convince me to move away from JS.
I really like your videos. Talk anything in the video, I will watch. I am your fan. :) I have been using Laravel for my entire career since 2014/15 and professionally after 2017. I knew little php when I started Laravel and learned all sorts of OOP after few years. Since php 7.4, it has really changed the way php used to be. :) Cheers.
mad props to the creator for diving deep into PHP and showing all the advancements it has seen over the years but lowkey, while I think PHP has come a long way and is still relevant, it's not the go-to for every project but yeah, anyone sleeping on PHP since 2012 needs to wake up and see all these cool updates keep up the grind!
Sorry man. If you liked Looper, I can't trust your ability to determine what sucks
Oh it gets worse. I have an entire page on my site that ranks the Fast and Furious movies. aaronfrancis.com/lists
@@aarondfrancis it makes sense that you make videos on php AND have a list like that.
@@MrNedinator two awesome things!
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkK!
@@aarondfrancis, you are truly gigachad! Continue doing what you love!
How is it possible? Ten minutes flew so fast.
You rock, man. Keep it up!
Thank you so much!
I had no idea PHP evolved so much. All of the things I wish it had when I stopped using it actually are implemented now. Awesome vid!
I started my career with PHP, 5 years ago and even if I now work primarily in Go, I still keep up with all the new features. It's still massively useful to me for small websites and other minor projects.
same here, hail Go :3
even minor projects i use Go XD
hey go devs, may I ask what do you use go on your daily basis@@kokizzu
@@kokizzuyou guys tried sveltekit?
Work has pushed me from php to go... Haven't worked much with go, but so far I think... php is light years better for web dev, and likely in general. Jesus Christ no ternary... useless vars and statements FTW... what a load of bs....
@@morphles If you ever worked in a big team you would have learned to hate ternaries.
Just keep the code readable.
I actually got my first job in PHP 10 years ago and since then jumped around using, JS, GO, Python, C# and today I work for a company who uses PHP. Its definitely not dead.
when someone claims that something is not dead, then it definitely is. otherwise no need in such statements
you are not dead @@guai9632
Python is not dead.@@guai9632
@@guai9632 >70% of web, dead sure
I sometimes wish I hadn't missed out on PHP when it was popular. I got into web dev with React around 4 years ago. It sometimes feels like the Node ecosystem is finding increasingly convoluted ways of reinventing PHP.
leave it. learn ruby with rails (full stack mvc), sorbet (statical types) and hotwire (SPAs, animations etc.), or elixir with phoenix (also full stack mvc) and liveview (SPAs...). laravel has something similar btw, livewire for SPAs.
javascript and node have chaotic ecosystem, in time dependencies grow into unmanagable and unreliable mess. also, react has insane update rates. both problems will result in burnout. aside from javascript being javascript.
Learn serious framework written in well designed language. The 3 i have mentioned are fullstack, meaning that you can use them to build frontend and backend, APIs, CMSs, SPAs and so on. With wasm the possibilities are endless. And if you want to have knowledge about client-side apps, learn Angular - stable, mature, consistent. And there are 2 version for different usages. One written in Typescript, the other in Dart.
oh, and do not be a fullstack at work. You will have 2 times more responsibilities than front or backend dev. If front-end -> Angular, Dart, maybe Flutter and Unity if you want mobile apps, games, interactive movies. If backend -> Rails, Phoenix (the advantage is concurrency/parralelism and functional, not object-oriented paradigm, contrary to the rest options) or Laravel (or Symfony). That is, if you want to stick with web development. If operating systems and desktop apps would be more interesting -> C and Rust, maybe Zig but start with Nim, Crystal or Go to be comfortable with compiled languages and different memory management methods and garbage collection styles. If big data, machine learning, computer science and AI -> Python, Julia, Matlab, R and Ocaml. Python and Julia are the easiest, Ocaml is as difficult as Rust.
Do not touch the JVM ecosystem, it is a mess comparable to node case.
And it for the most part is still worse that php
To me who started on PHP around 2012 and continued using it until around 2017 and moved to React it seems that PHP of today is also finding ways of reinventing JavaScript, which I don't see as a bad thing. We learn and we grow collectively from each other and somewhere around year 2100 we'll have one language to rule them all.... but to my experience it will end up competing with every other language and these wars will continue. :D
Because it is, just in a bad way 😅
PHP and Turbo is all you need for most use cases.
from someone who went from c# to php, and saw all those changes from php 5 to 7 and now 8, this language is gathering its fast application on market alongside with the goods that comes with statically typed languages. Absolutely amazing work from the PHP team!
Honestly we owe the PHP team a lot for continuing to adapt
if you use PHP and talk of speed, you are in wrong application area :D
also, xeons and memory these days are cheap, add as many cores as needed. 2004 PHP was struggling, not anymore.
All of this new unique feature that new PHP has now, C# had in 2008
True, many of them. But PHP started as a scripting language to create dynamic web pages. It was initially developed by Rasmus Lerdorf in 1993. Rasmus was not an expert in compiler design. C#, instead, has been designed by Anders Hejlsberg, who created Turbo Pascal, Delphi, and then eventually moved in Microsoft when he first built a Java compiler, and then he made C#, and most recently Typescript. Hejlsberg is one of the most influent compiler designer. That why C# used to be so much better.@@nikolaslijepcevic
Dude! C# had a lot of positive changes over the same time. I'm not sure if you got the better deal or not.
Loved the video! The flow of it was purely amazing and entertaining! I am using PHP professionally and yet most of these went under my radar.
Glad I finally found your personal channel. Love your videos!
It's me! You made it! 🫡
"when have you personally needed 50,000 requests per second? how many users do you have?" 💀
Had to do it to 'em
* thdxr enters the chat *
Which language should we use in this case? What do you think guys.... Python? I don't think so...
@@bgeneto if you're hitting 50k plus it's time to roll some qbasic
@@bgenetosomething compiled maybe
Haven't really touched PHP since 2004. It was nice to have a summary of those things. I appreciate the fast pace!
Great video! It's been quite some years since I worked with PHP, happy to see it has adapted a lot of the features, I enjoy in other languages (C# and Typescript). Keep up the good work
Thank you for continuously promoting PHP. From a fellow PHP developer.
❤️
❤
yes, we moved from "some" framework to php with our 1M uniq per mo, and hardware cost lowers x3
I'm coming from the Java world and started learning PHP for a future personal side gig, and after reading about PHP 7 and 8, I'm excited about it. I chose PHP over NodeJS because I didn't want to deal with NPM hell.
Your content, enthusiasm and embracing style makes me relish the fact I have endured with PHP since version3 - keep up these amazing posts - thank you
Gah that's so encouraging. Thank you
I've been using PHP professionally as my primary language since PHP 3, it rocks a lot more than it used to!!
😂 remember when PHP 4 slowly made it to virtual hosting machines and broke everything so you had to rename files .php3 for them to be ran through the php3 interpreter 😅
XAMPP & WAMP
@@nimmneun yeah I remember it well, there were a few episodes like that through the years but each one brought more understanding of the architecture, I'm happy it taught so much
@@coldestbeer LEMP/LAMP stacks mainly but I do have a VM with XAMPP that I use sometimes
@@74Gee I'm talking about the old days when I'd use xamp & wamp. Today its lamp.
Dude, I feel like I am quite on the edge using PHP8.1 and stuff for quite a long time but even I learned something thats cool AND useful to me (usually it's just cool). Great video!
I used PHP for work (specifically with Laravel), and I was introduced to 7.4, but when I saw what 8.0 and 8.1 had, I knew PHP was a competitor. I would still likely not choose it, but it's definitely on par with modern languages in my opinion. Thanks for making this!
Modern languages suck though. If your code looks more like maths than english, then its a hard fail.
Amazing video. Didn’t know PHP could do most of these. Lovely features.
PHP has put a roof over my head, food in my stomach, and numerous backpacking adventures around the world.
🎉
For huge number of requests you can use the Swoole extension where you get a Node-like webserver continuesly running and processing requests with an event loop. At one place I even had to introduce sleeps in the microsecond range as the database was not fast enough to keep up with changed data.
Or just use roadrunner if your framework uses psr request/response objects
Most people that say "PHP sucks" have never used PHP and started coding with javascript with React
Well, js and react suck as much as PHP does
@kwinso I avoid JS like the plague. Unfortunately JS is the web's programming language but if I can do it without Javascript, I'll do it without Javascript
@@kwinso What doesn't suck in your opinion (for back-end web development)?
@@AKHOPcomRust or Go
I have used PHP. I had to make my own PHP framework to make the language remotely usable.
It fucking sucks. The only usable thing about PHP is that it’s Turing complete, but hey so is brainfuck.
Php continues to get the job done! Something else that's a "newer" addition I love...using First class callable syntax, often in place of where I may have a verbose arrow function callback. Places like collections, array methods, or even when you need a callback to bind a class into the container.
This man knows his stuff.
@mabdullahsari Says the very man who introduced me to FCC's!
I've been using PHP for my job for the last 14 years or so, I try to keep up with the version updates but so often forget what's possible because I'm so used to old school PHP. I learnt a completely new one from your video though, I did not know you could pass key: value named parameters to functions that's amazing! 😲Also had forgotten about the match() function instead of switch statements which is beautiful.
I'm switching jobs. After about 10 years of PHP I worked with Java for almost 5 years and soon back to PHP. I'm excited to use this modern and useful syntax!
Sweet.
You recapped very well.
Although I was aware of almost all of them, I could never recap this way.
Good for you!
Thanks!
An interesting overview of new things! But what made me dislike PHP back in the day isn't so much what it lacked, but the weird things it DID have. I'd be very interested in a video about what ISN'T in modern PHP... what are some things that were bad that nobody uses anymore (even if they're technically in the language)?
Interesting question... I'll noodle on it!
Rest assured no one has ever touched goto operator 😂
Or eval for that matter… not any time recently
Gone entirely or indeed so rarely used that they might actually be gone: non-numeric strings comparing equal to 0, eval, register_globals, magic quotes, open_basedir, a lot of the headaches with different character encodings (UTF-8 is now the [sane] default everywhere), the mysql extension (all mysqli now), the "each" function (the foreach construct makes much more sense)
It really is a slow process to get things removed from the language, as that will usually prevent someone from just upgrading. However, there was a big game changer: Composer dependency manager.
wow, i have learning much from this video, i had not idea of naming parameters in functions, "match" function, destructure in array,
Php with enums, union types, and match was what got me through the pain of -> . Else I would've resigned, laravel or not
It took so long to get enums. That was a glaring problem with PHP for years.
You do good videos, and seem positive. Good job! Also, I love PHP, so that helps. I wish you did more videos on PHP.
I want to be a positive force for PHP. Thank you for saying that. ❤️
Small correction to your array destructuring segment: No, you didn't have to manually declare seperate variables and then access by index. Long before that was a feature, PHP shipped with the list() function which does essentially the same thing only slightly more verbose
A very good point indeed. Forgot about list
example please
$info = array('coffee', 'brown', 'caffeine');
// Listing all the variables
list($drink, $color, $power) = $info;
echo "$drink is $color and $power makes it special.
";@@mibrahim4245
@@mibrahim4245 $array = [1, 2, 3]; list($first, $second) = $array; var_dump($first, $second); //int(1), int(2)
True, but list is fussy. You can only use it with indexed arrays, and you don't have much control over which elements to extract.
List:
$array = [10, 20, 30];
list($foo, $bar, $cat) = $array;
echo $foo; // Outputs: 10
echo $bar; // Outputs: 20
echo $cat; // Outputs: 30
Destructuring:
$array = ['a' => 10, 'b' => 20, 'c' => 30];
['c' => $foo, 'b' => $bar] = $array;
echo $foo; // Outputs: 30
echo $bar; // Outputs: 20
I was in a meeting with a senior developer with over 15 years of experience.
He commented: "It is bad, slow, untyped, and a poor language for script kiddies.'
In response, I asked, 'Which version did you try?'"
Senior dev: "3"
Some people...
Yiiiikes
OK I am in love with this video; Bravo to the editor. You sir have earned a subscriber.
🫡 I won't let you down!
"I'm no longer an accountant, and PHP no longer sucks" 😂💖
Everything works together for the good 😂 ❤️
Nice video Aaron, caught a bunch of stuff I wasn’t aware of!
I author Raylib-PHP native extension, Raylib is a game library for Windows, Linux, macOS, Raspberry Pi and Android. Two items left out is JIT and FFI :). On my M1 Mac Mini it's almost on par with NodeJS, with JIT enabled, in my unscientific test it was about 10% slower, for moving and rendering 100,000 sprites on a screen (44 FPS NodeJS vs 41 FPS PHP with JIT). FFI is critical to let people consume shared libraries .dll, .dylib, .so files in PHP without needing to write low level C code. For Raylib, that comes at a performance hit, which is why I still write C interop PHP bindings. There are still some holes in FFI, i.e setting up native C callbacks is not supported on all platforms and leaks memory.
I already knew php wasn't dead because this channel exists.
I love that this is JUST talking about PHP. The language itself has grown so much, and this video doesn't even touch on the fantastic ecosystem, the best package manager around (composer), frameworks like Laravel, etc.
I want to do one on composer only at some point. It's so so good
@@aarondfrancisDefinitely on composer, Its d d d best
For those like me who never thought PHP sucked, title of this video is "Modern PHP in 10 minutes!". Thanks @aarondfrancis!
Two little known superpowers of PHP are: Arrays and CLI. First, the PHP array (hash table) implementation is unique among all programming and scripting languages: Integer and string keys in the same data structure while _maintaining order of inserted items_ when iterating over the array and yet having O(1) for all operations. Second, PHP CLI allows for _system development._ Sure, you can run PHP CLI from cron jobs but you can _also_ develop and deploy root level, always-on system services that start with the OS at boot. Throw in PHP extensions (e.g. via PECL or roll your own) and you can expose any C library or system call to PHP CLI userland.
PHP array, loved it!
Most of these have been implemented in other languages, so I'd be still sticking to Typescript. But the sensitive variable stuff is very intriguing, not going to lie.
Typescript is still JavaScript @ runtime 🤮
Developing in PHP for 25 years, learned some new things from this video 😅 subbed
PHP 7 performance boost was so massive that the earth started to spin faster when it was released.
Aaron, I love your videos man! I am so happy that you became popular in the community and started doing such cool things!
First impression: PHP became a Frankenstein's monster because it mixed and matched a ton of features of at least half a dozen other languages. But of course languages seem to converge more and more, it's interesting to think about when are they going to be so similar that they would stop multiplying like they keep doing at the moment.
one decisive factor is the ecosystem: laravel symfony and apiplatform... very few (if any ?) backend oriented languages have such a strong ecosystem when it comes to productivity, 8.2 + those tools = the best backend developer experience out there
@@bilp_bloup_bot I'm not an expert at web app backend development so bear this in mind when you respond: what's your opinion about Python and its related "ecosystem" with respect to backend development experience? Isn't it efficient/straightforward/mature enough?
Amazing. Was working with PHP for years, but it's almost 10 years ago. Now I see that it is evolving as every other language and for me it looks like all languages are coming closer to each other providing same tricks and shortcuts for us :)
Really well-made video. It demonstrates how PHP caught up with TypeScript in a lot of ways.
This is incredible news for PHP developers. The reason I feel PHP isn't very relevant today, however, is that I don't see any reason why someone would switch from TypeScript/Kotlin/Python to PHP.
Considering that 80% of all websites run on PHP, I'd say that PHP is the most relevant of all. The RUclips influencer bubble gives a skewed perception of reality. In the real world, PHP is king.
Python is slow as shit as an application language, Koatlin/Java is proprietary and expensive to run and TypeScript is not even a language. JS is indispensable but a mess of a language.
PHP is 3x faster than Python now
I have learned Python/Django, javascript/React, Java ( for DSA ), and Golang ( Only the basic, because I want to try it a little). But in the end I want to switch to PHP/Laravel because in my country it's easy to find junior role with this language for full-stack / backend role. (I'm sorry if my English is decreased, and my thought is wrong)
PHP is definitely more relevant than TypeScript or Python for web development. Django and NestJS are solid Python and TS frameworks, but they're years behind Laravel and Laravel has always been one step ahead of them for rolling out new features.
thanks for this video!!! I've been working with php for 2 years, but didn't know some of this stuff. Thanks
PHP is amazing, and far from dead, PHP is what got me programming at the age of just 9 years old, its languages like PHP that really give people the opportunity to learn programming.
The projects I work on, I built 12+ years ago with PHP. They were performant then. But I've migrated them to 8.2, and I use a skeleton Symfony install (for routing mainly), and they're ready for the next 10 to 20 years. If it ain't broke, don't fix it. Especially don't just move it to the newest, shiniest thing because you can.
I find that PHP is really all I need for most things I build. PHP, Twig and Turbo goes a long way.
If I have something more complicated, there's Symfony and Laravel.
I do prefer other languages, but just for making a website without much hassle, PHP is the way to go.
Has been ages since I last used PHP. Thanks for the update.
Definitely a +1 with the PHP speed, we run a game analytics platform and we easily handle 20-30mil requests per week. It’s nowhere near as bad as people make it out to be
Isn’t that like 2 requests per second?
@@dhkatz_ no, it‘s up to 50 per second
Loved this. Thanks. Subscribed.
While your points are valid and PHP definitely isn't dead, would be interesting to see a comparison of PHP to the other options to really see if it's worth adding to one's skillset. I feel like a lot of companies are still using PHP because they haven't been able to afford to switch to something else due to having large scale apps. Awesome video :)
If you ask contextless question like „which language is the fastest?” The answer will never be one of the popular languages (zig is the fastest language, Lua the fastest scripting language). Which language is most performant for handling web requests? Elixir/Erlang. What matters much more is the landscape and infrastructure around that language. Here PHP is King in the web application environment, no other language can compete. And nowadays PHP outperforms all other big name scripting languages (except Node).
Why switch to something else when PHP is all they need?
This is amazing! Thanks for the rundown. Haven't used PHP since 2013 probably, when I was doing WordPress brochure sites. I might just have to try it again someday!
PHP has Laravel. All you need.
as a new comer in the PHP ecosystem, this video is for real awesome! thank you!
PHP is fine. It works well, a lot of random stacks developed since the 2000s, but I don't see them any better than plain LAMP.
Thank's a lot Aaron for this great video and your support for PHP 🙏👍😀
i have been using PHP for several years and still work with many version, and named function arguments are easily my favorite
Hey you are that friendo from the very good planetscale vids. Subbed! You are great :)
It's me! Hi! Thanks for the kind words
Haters gonna hate....They were saying PHP was gonna die 10 years ago. It's changed so much, continues to grow, has a great, supportive community, and owns how much of the web again? Just Wordpress alone (love it or hate it) is enough said.
If PHP is enough for me to make decent cash to support my family... I ride the PHP wave until it crashes. PHP lives on.....
PHP is dead walking
even fortran and algol is not completely dead. they just aren't as alive as they used to be. so is php
Your way of saying things is so much fun, making this a really fun and easy watch, I have a little comment, it would be nice to just tag every example with a since PHP x version, so we have a reference, thanks for sharing
Thank you Aaron for keeping the PHP flame alive!
These new kids think every shinny new toy is better than the last one, they see NextJS and think PHP is dead, when we know that's not the case.
I say PHP is years ahead of anything in the NodeJS ecosystem, it's just so bad and needs to mature a lot, the ecosystem and the community around it...
Well problem is there is no job in our country for PHP developers .. well there are some jobs but those jobs are about deprecated code in PHP or moving PHP into some reasonable codebases which are written in .. Java, C# or Python. So yeah PHP is dying .. even my university does not teach PHP anymore.
A perfect video. Quick, informative, and entertaining.
I think it will be linked very often in response to lazy comments.
For pragmatic developers PHP never sucked. If you are in the ideological camp which is fueled by "I know it better" egos - yes - then PHP might have sucked due to its lack of making hipsters happy. I have PHP projects which are 15 years old and there was never any issue with reliability, performance and upgrading. Therefore I am ignoring all that noise of developers who will suffer more and more from the chaos of the JavaScript only approach. And on the server-side PHP is by far the most efficient, performant and economic interpreted language. And not speaking about the huge ecosystem and modern frameworks which have a strong focus to workability and pragmatism.
Really worth the time, i enjoyed the video. and learnt a few things. Thanks Aaron
Btw ... I hope you'll find the chance to do videos a bit more frequently. They are pleasant to watch and there are many cool/modern open source projects to cover ... and PHP is not just wordpress, laravel and symfony 😊
Thank you! I'm glad you enjoy them. I'm certainly going to try to do them more frequently
@@aarondfrancisso nice that you followed through 🎉 100k subs this year gogogooo 🎉
I use PHP 8.2 every day - I thought I was pretty up-to-date on modern PHP, but you've just blown my mind with the null chaining operator. No idea how I missed that!
If you need to handle many requests or in async, PHP Swoole can be used. Also, use load balancers and put as many web servers under as needed. PHP is still scalable in this way 😂. And when the cloud servers starts to get expensive, you can always switch to dedicated servers with 80 cores, 256 GB RAM, 2x4TB nvme disks for 260 EUR per month. Those should be able to eat some req per sec and store some data for ya! 👍
The existence of swoole indicates that there's something lacking in the language.
Yeah. I have a side projects where Google decided to send me ~500k additional real users over a couple of days (they suddenly added >100k pages to the Google index) with millions of requests. My little server for that costs less than 50 USD per month and wasn't disturbed at all. Just proper modern code with PHP 8.2 and it ruuunnnns.
@@lako2023 PHP doesn't get the credit it deserves for low cost, and speed. It is the easiest language to find hosting for.
Great job Aaron - I will probably refer back to this video several times ;)
I really like when a language improves but I think most of the time you end up working in a 7 years old project that is never updated, I believe that's the reason why devs prefer moving to other language.
Pretty good point, probably true
The problem is going to be repeated after the 7 years for the application built with new Language too. So it’s not the language which is a problem but the culture of the company is.
Php has really made some improvements. Nice to see.
Time to look at PHP again. Awesome video!
there is no way this is PHP??!? yall just looked at JS and thought... huh!! *copies syntax frantically* 🙂
js devs: 🧐👀
am dead! 😂😂 but i love it. I will try PHP.
The best part is that is all vanilla / native. no need external tools ;(
Wow, first off great video - thanks. Second, I need to look into PHP again (last used it circa 2010 ). Had no idea the improvements. Between this and your Laravel video I'm excited to do some weekend hacking. Installing PhpStorm...
8:54 Love the transition from types to constructor promotion!
Thank you! I was proud of that one 🤓
Great wrap up Aaron. Thanks for this. Enum is so good.
Yet another gem, thanks Aaron!
Best video of the year Aaron! 🥰
I had a good laugh watching this video. The level of sarcasm about how PHP isn't dead is on point. Good stuff :)
Haha thanks, I always try to thread the needle on education + entertainment!
You are such a great communicator! Thanks for the video. Learning PHP right now, and am kind of not understanding why people hate on it, since it seems very capable to me. Of course I haven't really tried any other server side lang yet, but still. PHP definitely gets the job done smoothly.
Will be learning JavaScript and Ajax to get client side rendering going on my projects as well. In combination with PHP I cant see a better easily-learned combination of web dev languages
I'm using PHP for backend and JS for frontend and it's working flawlessly!
Cool video, there is only on tiny thing missing. Which version provided functionality. I just saw match and found use for it but unfortunetly I'm still on 7.4 in the project and it went with 8.0 :)
Man, this 10 minute video has so much crazy good content that brings so much value to the viewer. I am amazed
Thank you!
You're welcome! I am also enjoying your database course as well and trying to wrap my mind around all the content and improve on my database design and indexing :) Never thought there might be someone better than Jeffrey Way in terms of tutorials, but you're almost there!@@aarondfrancis
I started with PHP 4.2, it's amazing how much the Personal Home Page and evolved. I think the reason a lot of people will say PHP is dead or it sucks is that it's a hip trendy thing to say and sound like you know what you're talking about... Kinda like learning how to do "Hello, World!" or a Sudoku Solver in some new popular language then saying to people you know said language, they're just a bit "Rust-y" not as "Swift" but ready to "Go".
Thanks for this Aaron
A nice summary of new features of PHP! I still won't use it haha, but it is nice to see that a lot of effort has gone into improving PHP.
My man be ranting his about people’s stereotypes about PHP, and he totally deserves the attention.. kudooos for this..
Laravel already won me over but this video seals the deal. "Haven't been paying attention since before 5.4" is exactly me. I only heard about 6 being cancelled and 5.4 bringing some OO stuff and short array syntax when I already had tapped out from PHP for years. I had memorized PHP being slow and bad the same way I had memorized the world population being something like 6 billion. But time moves on and things change. We should always remember to keep learning and not assume the facts we learned to be absolute and unchanging.
Well done, I remember writing PHP a few years ago, used it for a quick website for my wedding and had used it previously for a small church website in early 2000s but it's good to know the language isn't what it used to be.
Really good video, btw. I was unaware of some of these more recent developments since I've been using primarily Python since the apocalypse.
this channel is going to blow up. i know you are already famous but you are going to be a celebrity. this video was featured in primeagen's channel. keep up the good work. let's convert the devs who use nodejs for backend to php/laravel backend devs
You're incredibly kind to say so. I would love for this channel to grow! I'll keep working and we'll see ❤️
this is such a valuable video, works with me as a refresher, because, I haven't been writing PHP for a while and now back to it. It's fascinating how the community became so progressive post-5, kudos to all the contributors
Listening to this, looks like PHP really borrowed all good features from popular languages. Good going.
Beautiful! learned a bunch of things, ty! you forgot nullable types with questionmark like function(int ?param1)
Doh!
And void
I come from a PHP background and I still have many friends that use the language. They've been promoting these new features to me as if to say that the language is moving in the "right" direction. While it's very speculative what's the right direction after watching your video I realized that the focus on the language is to add simplicity and functionalities while it does not enforce many(any) good coding practices.
I don't understand how a slew of arcane operators and hipster buzzwords is "adding simplicity". It's reducing key presses MAYBE, but at the expense of maintainability - which is where most of the $ goes in a system's lifetime.
Thanks for this video, it's great!
I have never hated on PHP. I loved it and it was my first major programming language (except C++ in high school, but didn't do much with that). JavaScript is my bread and butter now though. I will absolutely still work with PHP and consider it moving forward now that I know the improvements but it'll be extremely hard to convince me to move away from JS.
One strange thing I like about PHP is the $ sign. It helps me to quickly spot variables
I really like your videos. Talk anything in the video, I will watch. I am your fan. :)
I have been using Laravel for my entire career since 2014/15 and professionally after 2017.
I knew little php when I started Laravel and learned all sorts of OOP after few years.
Since php 7.4, it has really changed the way php used to be. :)
Cheers.
You're too kind!
mad props to the creator for diving deep into PHP and showing all the advancements it has seen over the years
but lowkey, while I think PHP has come a long way and is still relevant, it's not the go-to for every project
but yeah, anyone sleeping on PHP since 2012 needs to wake up and see all these cool updates
keep up the grind!