My most recent experience is with PHP 5, but do you mean the spl_autoload_register? Apparently it is still around. At least I found the __DIR__ construct to be very simple to do relative imports, I wouldn't say Python's import mechanism is any better.
And that's the reason doing PHP means working with a lot of legacy codes that are pretty horrible. That was a reason I left it and it is the reason I am not coming back.
For me the Array functions are one of the best features. They will be replacing so much functions out there, making the number of lines in each php file go down, and increasing the performance in general terms in old php apps.
4:16 - it's one of the ways to write string in PHP called nowdoc. It allows you to write text without worrying about escaping characters, so great for embedding HTML or JS. After
Yes it's really nice. You don't need to escape because you can choose whatever you like as the string delimiter, so you choose something that doesn't appear in your literal string. And also if your literal string is another programming language (or even also in PHP) then by convention you use the name of that language as the delimiter. IDEs detect that so they can do the appropriate analysis & highlighting for that language. I use it all the time for SQL snippets, particularly for database schema migrations.
PHP's release cycle has been rock-solid since 2011, and it just got even better with an update this month (after 13 years!) to make the EOL date crystal clear: December 31. PHP follows two structured release cycles: one for regular maintenance and security patches, and another for feature releases. Each version receives security updates for four years after release, with active maintenance for the first two years. If there's one constant in life, it's that PHP will deliver a new version every year without fail.
PHP was always good. PHP, Ruby, Python... work horses that just gets shit done. You can always rebuild in Java or whatever when you actually make it to the scaling issues 99% of all software will never hit.
PHP was pure frustration. Absolutely one of the worst experiences for me as a programmer. Unintuitive execution, weird bugs that developers didn’t want to fix (remember a for loop using references…?). No block scope. Obsolete dollar sign notation. The list goes on. I’m sorry, I totally and completely disagree. Because of that shitty past experience I am actually very reluctant to ever look back.
Hiding logic behind setters and getters is a feature and mainly used to transform data seamlessly on set/get. It's a great feature in other languages and I'm glad that PHP now has proper setters and getters. The magic methods were horrible.
Yes, but he's definitely talking about side-effects. Which again, may not be a problem if that is a common pattern, like in Swift which has dedicated 'didSet' and 'willSet' keywords for intercepting setters for side-effects, be it saving something in a backing store, or triggering view re-layouts. One difference between regular getters and setters is that those will not be called on property initialisation, which is why they have different keywords.
I also tend to avoid adding any additional code to properties in C#. It’s just sugar for a method call, but a method seems more explicit that it may have side effects.
Property hooks sucks for those reasons, but asymmetric visibility is a top feature. I really like making readonly classes, but sometimes properties must be initialized late. private setters let me use _almost_ readonly properties without the aggravating getters/setters.
Only thing I'm missing in PHP these days is generic arrays or lists for improved typing of return values, especially in controllers, etc for improved documentation generation. But getters/setters can just get out of here, but at least it's a good option for those that rely on the magic getters/setters, because those are even worse.
@@SXsoft99yeah, I know. And I use them a lot. The problem is enforcing strict typing on a language level. Specifically for arrays when using reflection and code parsing. But I shouldn't have said generics. I just want a simple "[]Something" syntax, that's all. Bonus points of it can't turn into a Map randomly because a index was deleted, lol.
For the DOM API Update : before, the request was in XPath format, a query format for XM structures, very useful when you do a lot of XML parsing, like when you do a lot a xslts, and it can be useful for xhtml but it is not really appropriate for HTML imo, as html is not really xml. The new API support CSS selector query which is a bit less complete imo than xpath for selection, but simpler and more common on the web and the DOM API available in browsers.
The main problem with PHP is that as a dev, you're constantly fixing 5.6 code made by people who didn't know how to program when they wrote it. Modern PHP is beautiful.
This. We're trying to add types and stuff to everything, but it's such a monumental effort. Tools like Rector can help, but lots still has to be done manually
PHP is very stable these days, I end up spending hours debugging JS projects instead because they move at such a pace, and developers often make breaking changes with no upgrade path. PHP/Laravel doesn’t have these problems.
The ton of array_* functions is actually something I miss in some other languages. There are so many really powerful functions you can just use for pretty much everything array related and know they are optimized in performance and efficiency.
Hate maven/gradle/... and the frameworks and libraries seems to be over engineered, overcomplicated . Nevertheless learning java has made me a better PHP developer but still prefer modern PHP with symphony
Java is an absolutely terrible language. Everything is an exception. You'll learn how painful Java is when you start doing anything that, by its nature, is filled with failure states. For example: Networking. DNS queries can fail? Java exception. Transfers can be interrupted midstream? Java exception. The server can be temporarily down? Java exception. A packet is dropped? Java exception. No other language on Earth is filled with terrible decisions like Java has. It's a terrible language, no one should use it, and it was on its way out of existence until Google decided to use the JVM for Android. And that's before you get into the _awful_ tooling for Java.
@ working in the finance infustry. Everything is spring framework. It would be a nightmare having everyone spaghetticode a bunch of php. Couldnt one argue that the tech we build these things on is full of exceptions?
Exactly. PHP arrays are hash tables that maintain the order of inserted items and can mix key types. Most languages with "dictionaries" (aka hash tables) don't maintain insertion order of items. A few years ago, Javascript _finally_ started maintaining order of inserted items (after decades of not bothering) but PHP has always done this and did/does it best.
@@npcemprove6016 Arrays aren't black boxes. The source code to PHP is available for anyone to read. And there's an _excellent_ blog post on how PHP arrays work in both PHP 5 and 7 without having to delve into the source code that one of the core developers of PHP wrote around the time PHP 7 was released. Only minor changes were made for PHP 8. PHP arrays may be less efficient than alternative solutions but they are the most powerful and useful data structure to exist in any language on Earth. I dare you to make an equivalent data structure that outperforms PHP's implementation.
@MrMeltdown it does not round by default IIRC, I think it truncates. But the docs are your best bet. It's been a few years since I did any actual accounting with PHP.
PHP 8 is actually huge. They added JIT, match exp. and switch statement, add more places to throw, weakMaps, DateTime, enums and the readonly attribute. If they keep this pace up, they will soon reach 2010! (PHP in the backend is probably still better than JS, F U)
js needs config files over config files to have a stable development experience sgared in your team. PHP just has composer.json. If you are feeling fancy .editorconfig.
They didn't just add a JIT, they added one, realized it wouldn't scale, deleted it, and then rewrote another one from the ground up yet again, all in the span of PHP 8
What's the problem with function scoping? If there's too much in scope write smaller functions. And block scoping is annoying in JS when it means you can't declare a variable inside a try clause and then use it after the catch.
@@barneylaurance1865 Function scoping isn't as convenient -- lots more typing, especially when you need access to outside variables. And I often prefer longer functions, so smaller functions is rarely what I like. I can see what you mean with try / catch hassles, though.
Setters themselves are evil. Getters are decent in some instances, like getter for list's item count as it removes some obvious clutter. Setters are either a layer of indirection over public fields, or obfuscate important logic. They really should be either a public field, ideally in a struct or struct-like class, or a public method. Of course, some tools and languages have strong opinions about these, so you have to do what you have to do.
My only two issues with PHP is over-reliance on strings for everything, and lack of generics so you end up with "mixed" and "array" everywhere in your codebase. I also really dislike the syntax, but I can get over that
@@SkylearJ and therein lies the problem: needing another class (or mandatory PHPDoc comments) just for more specific typing just...sucks. Like it isn't enjoyable at all, especially on a team.
@@PraiseYeezus a class is just a struct in other languages. Whatever your mental model of PHP is, it's blinding you to the fact there's no real alternatives to the issue. In any other language you'd need to define a struct or an enum to accomplish what you're talking about, and in PHP it's the same; a class or an enum.
Languages and frameworks are a means to an end, not the end in themselves. Most of the features introduced into the PHP language are to make lives easier for the community that builds solutions in the ecosystem and are really appreciated. Obviously other languages have alternative implementations, but that's not the point really...
It's not entirely true. Whatever PHP is stateless is determined by how you run it. Using php-fpm makes your app stateless, using swoole makes it stateful (+ you got another features like concurrency, shared cache between workers etc.)
You should generally just have validation logic in property setters. Not logic that mutates the value itself, because you want to retrieve it as it was later from the getter. If you want to do complex actions on data use method with a name that tells you what it does.
It is very enjoyable when setter is written something like this - `set { _field = flase; }`, it is so fun I cant begin to describe how much joy that brings. But I am not against setters/getters.. they have their place to be..
When i first tried php 5 years ago and saw the function array_chunk, i was so happy. The fact that i can have effortless way to make a grid with bootstrap lol. Only recently i saw proposal for javascript to be included.
@ That sounds relatively autistic… at least on the spectrum but I get you. I have been a one-man-army web dev for 34 years. Maybe that's why I would take those underscores over fragmentation and excessive infrastructure. 🫣
@@greenjello421the current standard is to use camel case. There are some built in functions that use underscore but if you write a function you use camel case
i like getters and setters, nice syntax-suggar but what i really really REALLY want are accessors for classes, all classes are public by default and it’s so wrong IMHO
Im good. Enjoy though lol. Laravel was definitely the best thing that's ever happened to PHP. I don't hate when i have to work on it, but I don't enjoy it.
The last time I touched PHP must have been a good 15 or so years ago. It was one of my first languages alongside AS2.0. I will always have a small soft spot for it. I want it to do well. But seeing this just makes it look like it copied C#'s homework, except both the homework itself and the copier they used are from 15 years ago as well. C# introduced properties in v1.0 in 2002. Auto-properties were added in 2007, along with lambdas and LINQ (select, any, all, where, ...). It's verbose in all the wrong ways, and even in the examples I still see the same kind of crud that annoyed me back then (`bcadd` or a `Number` wrapper, for example). Laravel seems fun to play with, and I was hoping this might be the motivator for me to give it a try... It was not. It very much was not
The only thing php needs to catch up on is configuration, debugging and installation. Installing php and managing extensions is a pain. Also you always have to use creativity to debug things.
PHP is awesome, and feels much more robust. Smaller build pipeline, less dependencies, no state hell. React, Vue it was just a big mistake. Don't do client code, fire and forget. PHP is superior, long live PHP, JS is bad, TS is bad, we love PHP ❤
ooo they change the sibling thing thanks god finally, the problem is hat they are using an heredoc that in vs code you can read pretty good the html code that's why you are not understanding the first part and changing the siblig for query selector is the best path the could take. finally
@ well, it’s a 1+ million LOC 15 yo codebase that has parts written in 3 different frameworks (pure PHP, our own MVC framework and Mezzio). - Code style is nonexistent. There’s been 3 migrations from spaces to tabs and back to spaces. All unfinished. - There’s no unit tests. Somebody was writing unit tests 5 years ago, but since then all code has been untested. - API has no documented specification. Internally, calls to our new API versions are rerouted to old APIs. So changes to the new API break old API. - And of course we use micro services so that now there’s 20 services all tangled up together so much you never know if a change in 1 of them will break the other.
Yes, all languages are good in small amounts -- the same way people thought New Coke was better, because they only had a small taste. But how much do you like the language when you come in on a project that another dev built in PHP? If you still like the language then it is a great lang, if not...
I
eally\don't\like\the\backslash\in
andom\places.
u can use 'use':
use I
eally\don't\like\the\backslash\in
andom\places;
$someVar = new places();
I don't like it and the dollars either but they have the merit of being different
I don't like them, I have a policy to only use them in the imports, not in the rest of the file
use Oh\You\Mean\This\Namespace? \Or\The\Global\Namespace?
I actually find this a bit easier to read than I/really/don't/like/the/backslash/in/random/places
The inspiring\guy\that\doesnt\even\use\the\language\but\wholesomely\gives\props\to\the\work - agen
Approved
Oh boy this new monitor position looks like prime is looking straight to me and im not ready for visual contact.
are you sweating cus i am 😂
just visual basic.
Now you mentioned it, I knew something feels weird and different than the usual lol
point to where he touched you
Watching Prime try and understand the Autoloading mechanism in PHP will be super fun.
My most recent experience is with PHP 5, but do you mean the spl_autoload_register? Apparently it is still around. At least I found the __DIR__ construct to be very simple to do relative imports, I wouldn't say Python's import mechanism is any better.
@@nikonyrh he's talking about the PSR-4 autoloading mechanism
Generally you don't, composer does all that for you. At some point in the past I implemented my own autoloader, that was fun.
@@neonbyte1337PSR-4 still uses spl_autoload_register under the hood. The more things change the more they stay the same
@@elzabethtatcher9570 Everyone implemented their own autoloader back in the day lolol.
PHP never left
Never will
Pho always right
And that's the reason doing PHP means working with a lot of legacy codes that are pretty horrible. That was a reason I left it and it is the reason I am not coming back.
it was always in the garbage can.
But I leave, when I hear PHP
For me the Array functions are one of the best features. They will be replacing so much functions out there, making the number of lines in each php file go down, and increasing the performance in general terms in old php apps.
What you're confused about at 4:00 is string HEREDOC syntax. It allows you to put raw string data into a buffer and the
php is now discount C# lol
With weaker types
These getters and setters features are straight from 2010.
Good job PHP always behind the curve
I was thinking this too.
@@scott32874 same.
@@donnacasterr6223declare(strict_types=1); on top of your class and you have type enforcement
I don't know why, but Primeagen saying 'PHP' somehow summoned my Samsung Phone's assistant, Bixby... freaked the hell out of me hahah
15:00 missed the chance to say "the PRAGMAgen" there smh
4:16 - it's one of the ways to write string in PHP called nowdoc. It allows you to write text without worrying about escaping characters, so great for embedding HTML or JS. After
Yes it's really nice. You don't need to escape because you can choose whatever you like as the string delimiter, so you choose something that doesn't appear in your literal string.
And also if your literal string is another programming language (or even also in PHP) then by convention you use the name of that language as the delimiter. IDEs detect that so they can do the appropriate analysis & highlighting for that language. I use it all the time for SQL snippets, particularly for database schema migrations.
lol I have been coding PHP for 12 years and did not know this. Good to know. ob_start() and ob_get_clean() fellow here. 🙃
It's HEREDOC dumbass.
NOTE: nowdoc is also available in bash
@@kurku3725yepp, although ive always seen it called heredoc
Dang, I'm still getting to grips with 8.3. The PHP devs are on a roll recently.
PHP's release cycle has been rock-solid since 2011, and it just got even better with an update this month (after 13 years!) to make the EOL date crystal clear: December 31. PHP follows two structured release cycles: one for regular maintenance and security patches, and another for feature releases. Each version receives security updates for four years after release, with active maintenance for the first two years. If there's one constant in life, it's that PHP will deliver a new version every year without fail.
PHP was always good. PHP, Ruby, Python... work horses that just gets shit done. You can always rebuild in Java or whatever when you actually make it to the scaling issues 99% of all software will never hit.
No
@@philipmrch8326 explain
str_contains was introduced only in php8. Just think about that for a moment.
it absolutely not was always good. lol you guys are just falling for the hype now.
PHP was pure frustration. Absolutely one of the worst experiences for me as a programmer. Unintuitive execution, weird bugs that developers didn’t want to fix (remember a for loop using references…?). No block scope. Obsolete dollar sign notation. The list goes on. I’m sorry, I totally and completely disagree. Because of that shitty past experience I am actually very reluctant to ever look back.
Hiding logic behind setters and getters is a feature and mainly used to transform data seamlessly on set/get. It's a great feature in other languages and I'm glad that PHP now has proper setters and getters. The magic methods were horrible.
Yes, but he's definitely talking about side-effects. Which again, may not be a problem if that is a common pattern, like in Swift which has dedicated 'didSet' and 'willSet' keywords for intercepting setters for side-effects, be it saving something in a backing store, or triggering view re-layouts.
One difference between regular getters and setters is that those will not be called on property initialisation, which is why they have different keywords.
new PHP 9.1 released. you can now compile it to Angular or React
Agree about setters and getters. Reason why I only use autoproperties in C#, never custom get/set code.
I also tend to avoid adding any additional code to properties in C#. It’s just sugar for a method call, but a method seems more explicit that it may have side effects.
3:34 - PHP Attributes are like decorators in TypeScript thus can be reflected.
1:20 Just wait till he sees Swift's didSet which is a common pattern to trigger re-layouts/re-renders on state changes :)
Property hooks sucks for those reasons, but asymmetric visibility is a top feature. I really like making readonly classes, but sometimes properties must be initialized late. private setters let me use _almost_ readonly properties without the aggravating getters/setters.
Only thing I'm missing in PHP these days is generic arrays or lists for improved typing of return values, especially in controllers, etc for improved documentation generation.
But getters/setters can just get out of here, but at least it's a good option for those that rely on the magic getters/setters, because those are even worse.
you do have generics are doc blocks /** @return array{ hand: string, card: CardType | null } */ or /** @return array */
@@SXsoft99yeah, I know. And I use them a lot. The problem is enforcing strict typing on a language level. Specifically for arrays when using reflection and code parsing.
But I shouldn't have said generics.
I just want a simple "[]Something" syntax, that's all. Bonus points of it can't turn into a Map randomly because a index was deleted, lol.
Even Primegen uses PHP but does not Tell anybody !!
Can't wait for the PHP website arc
For the DOM API Update : before, the request was in XPath format, a query format for XM structures, very useful when you do a lot of XML parsing, like when you do a lot a xslts, and it can be useful for xhtml but it is not really appropriate for HTML imo, as html is not really xml.
The new API support CSS selector query which is a bit less complete imo than xpath for selection, but simpler and more common on the web and the DOM API available in browsers.
The main problem with PHP is that as a dev, you're constantly fixing 5.6 code made by people who didn't know how to program when they wrote it.
Modern PHP is beautiful.
Yeah but that's the easy money: no shortage of work for all that legacy code = Lambo in no time.
This. We're trying to add types and stuff to everything, but it's such a monumental effort. Tools like Rector can help, but lots still has to be done manually
no such thing as beautiful webcode.
That's why linters exists.
PHP is very stable these days, I end up spending hours debugging JS projects instead because they move at such a pace, and developers often make breaking changes with no upgrade path. PHP/Laravel doesn’t have these problems.
I wish Prime could make a video about Angular's latest improvements. I guess that day will never come to reality
he is not a frontend guy
Who cares about Angular
angular is fucking dead
@@hermessantos5258
I am aware, but sometimes, Prime makes videos about something related to React, even for making fun of React Andy's.
@@philipmrch8326 Your mom cares
Prime edging us at the end. Love to see it
PHP developer for 8 years. It's been good but I crave for change. Started my first golang project recently, really enjoying it.
I'm still waiting for Prime to unironically try (modern) C#, looks like we'll like it actually
The only thing keeping us back from Lambos is ourselves and PHP
The ton of array_* functions is actually something I miss in some other languages.
There are so many really powerful functions you can just use for pretty much everything array related and know they are optimized in performance and efficiency.
I’ve recently gotten into Java. So far i’m loving it, cause its just soo much better designed than php
Hate maven/gradle/... and the frameworks and libraries seems to be over engineered, overcomplicated . Nevertheless learning java has made me a better PHP developer but still prefer modern PHP with symphony
Java is an absolutely terrible language. Everything is an exception. You'll learn how painful Java is when you start doing anything that, by its nature, is filled with failure states. For example: Networking. DNS queries can fail? Java exception. Transfers can be interrupted midstream? Java exception. The server can be temporarily down? Java exception. A packet is dropped? Java exception. No other language on Earth is filled with terrible decisions like Java has. It's a terrible language, no one should use it, and it was on its way out of existence until Google decided to use the JVM for Android. And that's before you get into the _awful_ tooling for Java.
@ working in the finance infustry. Everything is spring framework. It would be a nightmare having everyone spaghetticode a bunch of php. Couldnt one argue that the tech we build these things on is full of exceptions?
@@privacyvalued4134 Someone's living in the Java 1.6 days
Is Java safe from spaghetti code ? I don't think so. Is PHP always a crappy mess ? Of course not.
PHP, I started learning 7, it was cool. Give me a foreach loop and associative arrays and I can make the world.
Arrays are inefficient black boxes.
@@npcemprove6016 So? I like them.
Nice, I think most Google API used to support PHP. Which you can leverage on your app.
Exactly. PHP arrays are hash tables that maintain the order of inserted items and can mix key types. Most languages with "dictionaries" (aka hash tables) don't maintain insertion order of items. A few years ago, Javascript _finally_ started maintaining order of inserted items (after decades of not bothering) but PHP has always done this and did/does it best.
@@npcemprove6016 Arrays aren't black boxes. The source code to PHP is available for anyone to read. And there's an _excellent_ blog post on how PHP arrays work in both PHP 5 and 7 without having to delve into the source code that one of the core developers of PHP wrote around the time PHP 7 was released. Only minor changes were made for PHP 8. PHP arrays may be less efficient than alternative solutions but they are the most powerful and useful data structure to exist in any language on Earth. I dare you to make an equivalent data structure that outperforms PHP's implementation.
Performance mentioned with static this and that, well now we clearly need a go-php-python benchmark video
Primagen is ready for FrankenPHP!
Honest take at 0:00, I like prime when he is riffing on something off the cuff. The prepared videos alright, but I come to prime for his raw takes.
Bcmath is for arbitrary precision decimal math.
Wanna add account balances? Use bcmath. You dont want floating point math for that.
Does it do all the correct financial rounding if set to 2dp by default?
@MrMeltdown it does not round by default IIRC, I think it truncates. But the docs are your best bet. It's been a few years since I did any actual accounting with PHP.
PHP 8 is actually huge. They added JIT, match exp. and switch statement, add more places to throw, weakMaps, DateTime, enums and the readonly attribute. If they keep this pace up, they will soon reach 2010! (PHP in the backend is probably still better than JS, F U)
js needs config files over config files to have a stable development experience sgared in your team. PHP just has composer.json. If you are feeling fancy .editorconfig.
It was always better than JS, despite its PHP 4 and 5 days
They didn't just add a JIT, they added one, realized it wouldn't scale, deleted it, and then rewrote another one from the ground up yet again, all in the span of PHP 8
PHP just needs to give us block scoping.
What's the problem with function scoping? If there's too much in scope write smaller functions.
And block scoping is annoying in JS when it means you can't declare a variable inside a try clause and then use it after the catch.
@@barneylaurance1865 Function scoping isn't as convenient -- lots more typing, especially when you need access to outside variables. And I often prefer longer functions, so smaller functions is rarely what I like.
I can see what you mean with try / catch hassles, though.
Setters themselves are evil. Getters are decent in some instances, like getter for list's item count as it removes some obvious clutter. Setters are either a layer of indirection over public fields, or obfuscate important logic. They really should be either a public field, ideally in a struct or struct-like class, or a public method. Of course, some tools and languages have strong opinions about these, so you have to do what you have to do.
We've come a long way baby!!!
When are you dumping zig/rust/go/c++ and switching to php, prime?
Setters and getter allows for hidden control flow
A lot of grandstanders on transmit in the chat when they should be on receive only. Thanks for calling them out.
My only two issues with PHP is over-reliance on strings for everything, and lack of generics so you end up with "mixed" and "array" everywhere in your codebase. I also really dislike the syntax, but I can get over that
Generics are so overblown. You can just write a class for whatever arbitrary type you're wanting.
@@SkylearJ and therein lies the problem: needing another class (or mandatory PHPDoc comments) just for more specific typing just...sucks. Like it isn't enjoyable at all, especially on a team.
@@SkylearJ Overblown? Wow wait what? 😅
@@Rein______ overhyped?
@@PraiseYeezus a class is just a struct in other languages. Whatever your mental model of PHP is, it's blinding you to the fact there's no real alternatives to the issue. In any other language you'd need to define a struct or an enum to accomplish what you're talking about, and in PHP it's the same; a class or an enum.
Languages and frameworks are a means to an end, not the end in themselves. Most of the features introduced into the PHP language are to make lives easier for the community that builds solutions in the ecosystem and are really appreciated. Obviously other languages have alternative implementations, but that's not the point really...
PHP is becoming a combo of C# and Java but it's still stateless :/
Stateless is it's advantage
It's not entirely true. Whatever PHP is stateless is determined by how you run it. Using php-fpm makes your app stateless, using swoole makes it stateful (+ you got another features like concurrency, shared cache between workers etc.)
Attributes are for metadata. You can get them with reflection API. to me, they feel similar to annotations
You should generally just have validation logic in property setters. Not logic that mutates the value itself, because you want to retrieve it as it was later from the getter. If you want to do complex actions on data use method with a name that tells you what it does.
BC is a unix program “basic calculator”. Cool homage.
thanks for the video, now I love Typescript even more
is php pronounced “fap” or “pahoop”
Aaron Francis is coming??!
It was so funny to watch him bounce while writing code
I’m waiting for the Ruby (Rails) session to hear comments about whether it’s horrible or not
Missed opportunity to say pragmagean at the outro
Great as long as I like sustaining work and am not worried about performance.
Modern PHP can run up there with the best of em. Perf argument is a skill issue.
ah yes because JAVA devs think about performance when they request extra RAM sticks to be inserted into the server rack
Who codes today in PHP should be a well respected developer. The AI support for coding in PHP is really shit, so it is avoided by idiots.
Avoided because the language is pure shit!
Who coded in PHP in the past should also be respected, like with any other language. You gotta have the Lambo somehow
I honestly think that the only good additions are the PDO subclasses.
PHP > RUBY
To be fair, it's easy to be better than ruby
Nah, the syntax is horrible. public private(set)?
Ruby's syntax for getters setters is 1000x better
@@TheRealCornPop if you said C# then I would agree, but Ruby is just way worse than this.
Good video Prime,
Laraval is the best framework ecosystem from far. ( I used
to hate php )
the "hiding" you don't like are one of the main concepts of OOP - encapsulation which is hiding implementation code from client code.
missed chance to say the name is pragmagen
lmao bro I have to sub if he puts his audience on the spot when they comment something
The name... is the pragmagen. I can't believe he didn't use it.
It is very enjoyable when setter is written something like this - `set { _field = flase; }`, it is so fun I cant begin to describe how much joy that brings. But I am not against setters/getters.. they have their place to be..
I love writing php. I'm sorry, but it is elegant imo.
When i first tried php 5 years ago and saw the function array_chunk, i was so happy. The fact that i can have effortless way to make a grid with bootstrap lol.
Only recently i saw proposal for javascript to be included.
and robust
I struggle looking at functions with underscores in them. Sorry but I disagree with you
@ That sounds relatively autistic… at least on the spectrum but I get you. I have been a one-man-army web dev for 34 years. Maybe that's why I would take those underscores over fragmentation and excessive infrastructure. 🫣
@@greenjello421the current standard is to use camel case. There are some built in functions that use underscore but if you write a function you use camel case
PHP 8.4 is good "compared to older version". Keep in mind
PHP 8.4 is still good on its own, so keep malding
pHP goes down the road of get/set hell.
PHP MENTIONED ♥
I'm introducing The DYHP (Dead yet highly paid) stack
Backend: PHP
Frontend (SPA): Angular
Mobile: Flutter
i like getters and setters, nice syntax-suggar
but what i really really REALLY want are accessors for classes, all classes are public by default and it’s so wrong IMHO
Enlighten us regards
you got an orange cat, duuh
Yes you will hear more and more about php, and laravel of course
Im good. Enjoy though lol. Laravel was definitely the best thing that's ever happened to PHP. I don't hate when i have to work on it, but I don't enjoy it.
Symfony > Laravel
The last time I touched PHP must have been a good 15 or so years ago. It was one of my first languages alongside AS2.0. I will always have a small soft spot for it. I want it to do well. But seeing this just makes it look like it copied C#'s homework, except both the homework itself and the copier they used are from 15 years ago as well.
C# introduced properties in v1.0 in 2002. Auto-properties were added in 2007, along with lambdas and LINQ (select, any, all, where, ...). It's verbose in all the wrong ways, and even in the examples I still see the same kind of crud that annoyed me back then (`bcadd` or a `Number` wrapper, for example).
Laravel seems fun to play with, and I was hoping this might be the motivator for me to give it a try... It was not. It very much was not
The only thing php needs to catch up on is configuration, debugging and installation. Installing php and managing extensions is a pain. Also you always have to use creativity to debug things.
PHP is awesome, and feels much more robust. Smaller build pipeline, less dependencies, no state hell. React, Vue it was just a big mistake. Don't do client code, fire and forget. PHP is superior, long live PHP, JS is bad, TS is bad, we love PHP ❤
PHP needs Elixr-like piping
ooo they change the sibling thing thanks god finally, the problem is hat they are using an heredoc that in vs code you can read pretty good the html code that's why you are not understanding the first part and changing the siblig for query selector is the best path the could take. finally
Imagine Taylor Otwell & Adam Wathan are the 2 dudes that will help Prime to build the php thing => EASILY around 1 zilion views.
no one like getters and setters, unless its 1995
Is it April 1st?
Brazil mentioned
Someone needs to make an EUPHP where $ is replaced by €.
Was waiting for the….
Pragmagen….
We’re still trying to migrate from PHP 7.4 to PHP 8.1
How is your code base that poorly designed sheesh
@ well, it’s a 1+ million LOC 15 yo codebase that has parts written in 3 different frameworks (pure PHP, our own MVC framework and Mezzio).
- Code style is nonexistent. There’s been 3 migrations from spaces to tabs and back to spaces. All unfinished.
- There’s no unit tests. Somebody was writing unit tests 5 years ago, but since then all code has been untested.
- API has no documented specification. Internally, calls to our new API versions are rerouted to old APIs. So changes to the new API break old API.
- And of course we use micro services so that now there’s 20 services all tangled up together so much you never know if a change in 1 of them will break the other.
I guess MPRE is possible now. Or PERM
I'm doing Django in my current project. I like python, but I'm not liking Django that much. Will give Laravel a try in a couple of months.
Not gonna lie. I clicked on this video primarily because of the cat.
2 person? Aaron and Taylor?
Kotlin>
Just liking for the cat
i had to type the dollar sign for five years. i'm not gonna do it anymore, you can't make me
I will make you and you will enjoy it no matter what
So you don't like money?
I'm here only for the cat.
DOM change is a long time coming
How can a language receive bug fixes?
Yes, all languages are good in small amounts -- the same way people thought New Coke was better, because they only had a small taste. But how much do you like the language when you come in on a project that another dev built in PHP? If you still like the language then it is a great lang, if not...
and you are saying bad code can't be written in other languages? Have you ever coded in js?
You're aware this applies to any codebase you inherit, right? How does this apply to PHP?
They should get rid of the $, backslashes for global functions, weird constructor and rename the language to get away from the bad legacy pr
CAT in the Thumbnail = Like
What is dead may never die.
PHP: Hello there
Change it to "Hello world"
*echo "Hello World";*