PHP 8.4 Is Good

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 523

  • @advertslaxxor
    @advertslaxxor 4 дня назад +429

    I
    eally\don't\like\the\backslash\in
    andom\places.

    • @kevas777
      @kevas777 4 дня назад

      u can use 'use':
      use I
      eally\don't\like\the\backslash\in
      andom\places;
      $someVar = new places();

    • @Exilum
      @Exilum 4 дня назад +40

      I don't like it and the dollars either but they have the merit of being different

    • @josecanciani
      @josecanciani 4 дня назад +14

      I don't like them, I have a policy to only use them in the imports, not in the rest of the file

    • @dealloc
      @dealloc 4 дня назад +16

      use Oh\You\Mean\This\Namespace? \Or\The\Global\Namespace?

    • @TheKodeToad
      @TheKodeToad 4 дня назад +5

      I actually find this a bit easier to read than I/really/don't/like/the/backslash/in/random/places

  • @DaveSmithHayes
    @DaveSmithHayes 4 дня назад +111

    Watching Prime try and understand the Autoloading mechanism in PHP will be super fun.

    • @nikonyrh
      @nikonyrh 4 дня назад +3

      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.

    • @neonbyte1337
      @neonbyte1337 4 дня назад +10

      @@nikonyrh he's talking about the PSR-4 autoloading mechanism

    • @elzabethtatcher9570
      @elzabethtatcher9570 4 дня назад +5

      Generally you don't, composer does all that for you. At some point in the past I implemented my own autoloader, that was fun.

    • @SkylearJ
      @SkylearJ 4 дня назад

      ​@@neonbyte1337PSR-4 still uses spl_autoload_register under the hood. The more things change the more they stay the same

    • @NoobSaibotVII
      @NoobSaibotVII 3 дня назад

      @@elzabethtatcher9570 Everyone implemented their own autoloader back in the day lolol.

  • @alexandrecolautoneto7374
    @alexandrecolautoneto7374 4 дня назад +166

    Oh boy this new monitor position looks like prime is looking straight to me and im not ready for visual contact.

    • @yalnisinfo
      @yalnisinfo 4 дня назад +8

      are you sweating cus i am 😂

    • @danigui8573
      @danigui8573 4 дня назад

      just visual basic.

    • @kuunibyou7642
      @kuunibyou7642 3 дня назад

      Now you mentioned it, I knew something feels weird and different than the usual lol

    • @elcapitan6126
      @elcapitan6126 3 дня назад

      point to where he touched you

    • @lovecoffeebutitmakesmegostutuu
      @lovecoffeebutitmakesmegostutuu 3 дня назад

      I wasn't ready for visual contact either but your pfp why, why, why are you looking at me like that

  • @IslayAnderson
    @IslayAnderson 4 дня назад +188

    PHP never left

    • @KewalTailor
      @KewalTailor 4 дня назад +12

      Never will

    • @samarnagar9699
      @samarnagar9699 4 дня назад +1

      Pho always right

    • @lazymass
      @lazymass 4 дня назад +2

      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.

    • @Marcus-forsen
      @Marcus-forsen 4 дня назад +1

      it was always in the garbage can.

    • @user-cj1jk9dc3e
      @user-cj1jk9dc3e 4 дня назад +1

      But I leave, when I hear PHP

  • @lukewood2662
    @lukewood2662 4 дня назад +55

    The inspiring\guy\that\doesnt\even\use\the\language\but\wholesomely\gives\props\to\the\work - agen

  • @TroyNiemeier
    @TroyNiemeier 3 дня назад +11

    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

  • @tsyf1
    @tsyf1 4 дня назад +81

    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.

    • @philadams9254
      @philadams9254 4 дня назад +5

      Yeah but that's the easy money: no shortage of work for all that legacy code = Lambo in no time.

    • @spicybaguette7706
      @spicybaguette7706 4 дня назад +1

      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

    • @happygofishing
      @happygofishing 4 дня назад +2

      no such thing as beautiful webcode.

    • @dealloc
      @dealloc 4 дня назад

      That's why linters exists.

    • @alexwhiteside
      @alexwhiteside 4 дня назад +4

      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.

  • @Noxfrolic
    @Noxfrolic 4 дня назад +60

    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.

    • @philipmrch8326
      @philipmrch8326 4 дня назад +9

      No

    • @albertoarmando6711
      @albertoarmando6711 4 дня назад

      @@philipmrch8326 explain

    • @rct999
      @rct999 4 дня назад +3

      str_contains was introduced only in php8. Just think about that for a moment.

    • @PraiseYeezus
      @PraiseYeezus 4 дня назад

      it absolutely not was always good. lol you guys are just falling for the hype now.

    • @martijn3151
      @martijn3151 4 дня назад +2

      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.

  • @d0cx
    @d0cx 3 дня назад +8

    I started my software engineering journey in Java, moved to Python for a few years, then got a job at a big old financial institution. We're using old LAMP and very old Java. We're finally starting to get into talks of bringing our old LAMP stuff into the modern space with things like Laravel, and Laravel is actually great. Makes it stupid easy to get a website going.

    • @sudeshryan8707
      @sudeshryan8707 2 дня назад +3

      Yeah. I can get a medium scale web app done in a weekend with Laravel while java/javascript devs are still doing configuration of the project 😅

    • @albertoarmando6711
      @albertoarmando6711 Час назад

      @@sudeshryan8707 there is nothing that competes with Laravel. Probably rails, but it is disappearing.

  • @KeganVanSickle
    @KeganVanSickle 3 дня назад +14

    As a PHP developer, I love how far PHP has come in the recent years. What I don't like however is the incredibly slow adoption rate for enterprise businesses.

  • @RuvenssGWilches
    @RuvenssGWilches 3 дня назад +9

    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.

    • @fred.flintstone4099
      @fred.flintstone4099 3 дня назад +1

      But it would be much nicer if PHP supported methods on variables then you could do method chaining with array functions like you can do in other languages such as C#, Java, and Rust.

  • @BoCarlson
    @BoCarlson 4 дня назад +18

    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.

    • @dealloc
      @dealloc 4 дня назад +1

      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.

  • @philadams9254
    @philadams9254 4 дня назад +17

    Dang, I'm still getting to grips with 8.3. The PHP devs are on a roll recently.

    • @johnwisdomtv
      @johnwisdomtv 3 дня назад +2

      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.

    • @philadams9254
      @philadams9254 2 дня назад

      @@johnwisdomtv Hey man, I totally agree and wasn't suggesting that it was ever inconsistent. I guess what I mean is that the quality of features for each release is slowly going up every time and each new version brings more 'wow' moments for me. They're not playing catch-up to fix bugs anymore and it seems like it's more about making forward progress now.

    • @GetFitEatRight
      @GetFitEatRight 5 часов назад

      The devs have been out of control... Its so nice and speedy.

  • @kevinforshey9259
    @kevinforshey9259 3 дня назад +9

    My Cat was my startup's first employee (other than me). He likes to chase flies around my apartment so he is our debugger according to his FaceBook page. He also like to sleep on top of the fans on some of my computers and let the warm air blow on him and he wakes up if it gets too cool, so he ensures that I keep a high load on my CPU.

    • @GameTornado01
      @GameTornado01 2 дня назад +3

      I hope he's employee of the month every month

    • @kevinforshey9259
      @kevinforshey9259 2 дня назад +1

      Oh yes he is. I have not seen any bugs in my office in quite a while, although he is complaining that we put in a new AIO cooler in my dev box so I’m running my cpu a good 20 degrees cooler but I just give him an extra snack and he’s ok so he’s still employee of the month.

  • @f.b.1665
    @f.b.1665 4 дня назад +12

    15:00 missed the chance to say "the PRAGMAgen" there smh

  • @Gornius
    @Gornius 4 дня назад +8

    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

    • @barneylaurance1865
      @barneylaurance1865 4 дня назад +3

      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.

    • @ian-tumulak
      @ian-tumulak 3 дня назад

      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. 🙃

    • @fullstackcrackerjack
      @fullstackcrackerjack 3 дня назад

      It's HEREDOC dumbass.

    • @kurku3725
      @kurku3725 3 дня назад

      NOTE: nowdoc is also available in bash

    • @cristiannovoagonzalez6558
      @cristiannovoagonzalez6558 3 дня назад

      @@kurku3725yepp, although ive always seen it called heredoc

  • @JorgeGonzalezPadilla
    @JorgeGonzalezPadilla 4 дня назад +15

    Can't wait for the PHP website arc

  • @yarmgl1613
    @yarmgl1613 4 дня назад +89

    php is now discount C# lol

    • @donnacasterr6223
      @donnacasterr6223 4 дня назад +13

      With weaker types

    • @evergreen-
      @evergreen- 4 дня назад +11

      These getters and setters features are straight from 2010.
      Good job PHP always behind the curve

    • @scott32874
      @scott32874 4 дня назад +1

      I was thinking this too.

    • @TehKarmalizer
      @TehKarmalizer 4 дня назад

      @@scott32874 same.

    • @SXsoft99
      @SXsoft99 3 дня назад

      @@donnacasterr6223declare(strict_types=1); on top of your class and you have type enforcement

  • @mihai996
    @mihai996 14 часов назад +1

    The main problem of developers is developers don't like reading words, developers only like reading code... and that's sad.
    BcMath is for "working with ARBITRARY PRECISION numbers". It is written just right there. It means you can use it to safely work with very large numbers without losing precision. It operates with strings but not with integers or floats.

  • @GetFitEatRight
    @GetFitEatRight 5 часов назад

    PHP has really gotten so much better in the last few years. Love the growth in such a mature language.

  • @neonbyte1337
    @neonbyte1337 4 дня назад +4

    3:34 - PHP Attributes are like decorators in TypeScript thus can be reflected.

  • @pesterenan
    @pesterenan 3 дня назад +1

    I don't know why, but Primeagen saying 'PHP' somehow summoned my Samsung Phone's assistant, Bixby... freaked the hell out of me hahah

  • @dealloc
    @dealloc 4 дня назад +3

    1:20 Just wait till he sees Swift's didSet which is a common pattern to trigger re-layouts/re-renders on state changes :)

  • @sentient_carbon
    @sentient_carbon 4 дня назад +3

    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.

  • @drcphd
    @drcphd 3 дня назад +1

    Nice. Thanks for the rundown.

  • @Volt-Eye.
    @Volt-Eye. 4 дня назад +9

    Even Primegen uses PHP but does not Tell anybody !!

  • @kozas0
    @kozas0 4 дня назад +14

    new PHP 9.1 released. you can now compile it to Angular or React

    • @fred.flintstone4099
      @fred.flintstone4099 3 дня назад +4

      Well you can already compile Laravel to WebAssembly and run PHP in your web browser. I heard Laravel is good.

  • @cruz1ale
    @cruz1ale 4 дня назад +5

    Agree about setters and getters. Reason why I only use autoproperties in C#, never custom get/set code.

    • @TehKarmalizer
      @TehKarmalizer 4 дня назад +2

      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.

    • @lucasayabe
      @lucasayabe 3 дня назад

      if you don't care about custom logic, just make all public...

  • @Teodor-ValentinMaxim
    @Teodor-ValentinMaxim 4 дня назад +20

    PHP, I started learning 7, it was cool. Give me a foreach loop and associative arrays and I can make the world.

    • @npcemprove6016
      @npcemprove6016 4 дня назад

      Arrays are inefficient black boxes.

    • @Teodor-ValentinMaxim
      @Teodor-ValentinMaxim 4 дня назад

      @@npcemprove6016 So? I like them.

    • @asagiai4965
      @asagiai4965 3 дня назад

      Nice, I think most Google API used to support PHP. Which you can leverage on your app.

    • @privacyvalued4134
      @privacyvalued4134 3 дня назад +2

      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.

    • @privacyvalued4134
      @privacyvalued4134 3 дня назад

      @@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.

  • @handmadegamesdev
    @handmadegamesdev 4 дня назад +8

    PHP just needs to give us block scoping.

    • @barneylaurance1865
      @barneylaurance1865 4 дня назад

      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.

    • @handmadegamesdev
      @handmadegamesdev 3 дня назад +1

      ​@@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.

    • @complexity5545
      @complexity5545 2 дня назад

      Then it would be perl.

  • @cubball
    @cubball 3 дня назад +3

    I'm still waiting for Prime to unironically try (modern) C#, looks like he'll actually like it

    • @fred.flintstone4099
      @fred.flintstone4099 3 дня назад

      Yeah, modern C# is quite nice. I like record types, and the getter/setter for properties. Also lots of other improvements such as implicit usings and nullable reference types.

  • @jex8885
    @jex8885 4 дня назад +6

    Only thing I'm missing in PHP these days is typed 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.

    • @SXsoft99
      @SXsoft99 3 дня назад

      you do have generics are doc blocks /** @return array{ hand: string, card: CardType | null } */ or /** @return array */

    • @jex8885
      @jex8885 3 дня назад

      @@SXsoft99​​⁠yeah, 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.

    • @lucasayabe
      @lucasayabe 3 дня назад +1

      @@jex8885 i really excited to the collections RFC because of this, i know the PHP team says generics is just impossible without destroying the performance of the language, but i would like at least have some more typed collections and the Collection RFC is perfect to do that.

    • @jex8885
      @jex8885 3 дня назад

      @@lucasayabe Ooo, that sounds perfect! If we get that in PHP I've got everything I need pretty much.
      And yeah, I don't think scripting languages need generics even, just having them as part of documentation is sufficient, otherwise you might as well do static compiled languages... But I need typed arrays at least. :D

    • @lucasayabe
      @lucasayabe 3 дня назад

      @@jex8885 its a really cool rfc, they give us a new structure similar to enums and clases, so instead of class IntArray extends Array you could have a collection IntArray

  • @gavinmurambadoro
    @gavinmurambadoro 3 дня назад +1

    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...

  • @madeOfClay99
    @madeOfClay99 4 дня назад +12

    I wish Prime could make a video about Angular's latest improvements. I guess that day will never come to reality

    • @hermessantos5258
      @hermessantos5258 4 дня назад +2

      he is not a frontend guy

    • @philipmrch8326
      @philipmrch8326 4 дня назад +4

      Who cares about Angular

    • @Kiba114
      @Kiba114 4 дня назад +1

      angular is fucking dead

    • @madeOfClay99
      @madeOfClay99 4 дня назад

      @@hermessantos5258
      I am aware, but sometimes, Prime makes videos about something related to React, even for making fun of React Andy's.

    • @madeOfClay99
      @madeOfClay99 4 дня назад +1

      @@philipmrch8326 Your mom cares

  • @NicolasPavie16
    @NicolasPavie16 4 дня назад +1

    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.

  • @tonyvechkin8
    @tonyvechkin8 3 дня назад +1

    Prime edging us at the end. Love to see it

  • @AndreasBeder
    @AndreasBeder 4 дня назад +5

    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 ❤

  • @kearfy
    @kearfy 2 дня назад +1

    I hate to say it but somehow php language wise seems to evolve better and faster than JavaScript lol

  • @fred.flintstone4099
    @fred.flintstone4099 3 дня назад +1

    I agree that PHP is getting better and better, and I really like how PHP has evolved. It has evolved greatly! On the other hand, many other languages are also getting better and better. PHP is still terrible when it comes to JSON and doing HTTP requests, and there is no way to generate UUID in the standard library.

    • @lucasayabe
      @lucasayabe 3 дня назад

      about json isn't actually much different of JS, but JS sucks so, i guess you're right

  • @catmankitty9504
    @catmankitty9504 3 дня назад +1

    The only thing keeping us back from Lambos is ourselves and PHP

  • @henrikrinne3639
    @henrikrinne3639 4 дня назад +4

    I’ve recently gotten into Java. So far i’m loving it, cause its just soo much better designed than php

    • @avilego4038
      @avilego4038 4 дня назад +1

      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

    • @privacyvalued4134
      @privacyvalued4134 3 дня назад

      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.

    • @henrikrinne3639
      @henrikrinne3639 3 дня назад

      @ 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?

    • @theshermantanker7043
      @theshermantanker7043 3 дня назад

      @@privacyvalued4134 Someone's living in the Java 1.6 days

    • @avilego4038
      @avilego4038 3 дня назад

      Is Java safe from spaghetti code ? I don't think so. Is PHP always a crappy mess ? Of course not.

  • @nomadtrails
    @nomadtrails 3 дня назад

    The DOM api is for html parsing and modification. Its useful to modify user generated html, such as on a Wordpress or other CMS site that migth be giving you formatted html, but you want to say, detect all the h2's and make a jump list sidebar out of them, but its all server rendered.

  • @praise96-b8g
    @praise96-b8g 4 дня назад +2

    Setters and getter allows for hidden control flow

  • @YvesBlatti
    @YvesBlatti 3 дня назад +2

    Primagen is ready for FrankenPHP!

  • @Jonjolt
    @Jonjolt 4 дня назад +4

    PHP is becoming a combo of C# and Java but it's still stateless :/

    • @neptronix
      @neptronix 3 дня назад +2

      Stateless is it's advantage

    • @mnda6
      @mnda6 3 дня назад +1

      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.)

    • @pierreclavequin3548
      @pierreclavequin3548 3 дня назад +1

      You might try with worker mode of FrankenPHP

    • @lucasayabe
      @lucasayabe 3 дня назад

      since oop introduction it always have been this way

  • @МамедЛорсанов
    @МамедЛорсанов 4 дня назад +3

    the "hiding" you don't like are one of the main concepts of OOP - encapsulation which is hiding implementation code from client code.

    • @mulatto401
      @mulatto401 3 дня назад

      The hiding you are doing is malicious because general intent of $a = 1; is for a to be of value 1, but it won't be with the magical trickery of these new getter/setter features.
      Next we will encapsulate the entire program into a single function and call it OOP.

    • @lucasayabe
      @lucasayabe 3 дня назад

      going even deeper, if you go back to the core idea that is message passing, you cannot have assumptions about any code in oop, as the messages don't have any meaning, its up to the object interpret that in its own way, so even x + y isn't garanteed to be a sum, because you cannot say if x and y are number objects, they could virtually be any object that support these messages like a string with concatenation, an array with concatenation, and etc.

  • @skirianov
    @skirianov 3 дня назад

    thanks for the video, now I love Typescript even more

  • @snake3444
    @snake3444 4 дня назад

    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.

  • @QckSGaming
    @QckSGaming 2 дня назад

    I'm just waiting for PHP that is not a major pain to install, deploy and work around. It's integrated in so many weird places and you have 10 PHP distros that have different workers and stuff. Please PHP, let it be the year of PHP.

  • @lugaidster
    @lugaidster 4 дня назад +3

    Bcmath is for arbitrary precision decimal math.
    Wanna add account balances? Use bcmath. You dont want floating point math for that.

    • @MrMeltdown
      @MrMeltdown 4 дня назад

      Does it do all the correct financial rounding if set to 2dp by default?

    • @lugaidster
      @lugaidster 4 дня назад

      @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.

    • @RustIsWinning
      @RustIsWinning 3 дня назад

      Wait so you are telling me that all that floating point arithmetic that I did years ago for banking software at a company was wrong⁉️

    • @lugaidster
      @lugaidster 3 дня назад

      @RustIsWinning no need to be a troll about it.

    • @RustIsWinning
      @RustIsWinning 3 дня назад

      @@lugaidster What do you mean? I already left that company so it's their problem now lol

  • @Kiyuja
    @Kiyuja 4 дня назад +4

    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)

    • @SXsoft99
      @SXsoft99 3 дня назад

      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.

    • @stefanalecu9532
      @stefanalecu9532 3 дня назад +2

      It was always better than JS, despite its PHP 4 and 5 days

    • @theshermantanker7043
      @theshermantanker7043 3 дня назад +1

      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

    • @RustIsWinning
      @RustIsWinning 3 дня назад

      Did they ever fix the broken switch typesafety with 0 and null etc.?

  • @MartynasNegreckis
    @MartynasNegreckis 3 дня назад

    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.

  • @noino
    @noino 4 дня назад

    Performance mentioned with static this and that, well now we clearly need a go-php-python benchmark video

  • @bluegamer4210
    @bluegamer4210 4 дня назад +7

    PHP MENTIONED ♥

  • @MadalinIgnisca
    @MadalinIgnisca 4 дня назад +2

    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.

    • @zlackbiro
      @zlackbiro 4 дня назад +1

      Avoided because the language is pure shit!

    • @stefanalecu9532
      @stefanalecu9532 3 дня назад

      Who coded in PHP in the past should also be respected, like with any other language. You gotta have the Lambo somehow

  • @chepossofare
    @chepossofare 4 дня назад +1

    I honestly think that the only good additions are the PDO subclasses.

  • @shafiq_ramli
    @shafiq_ramli 4 дня назад +2

    Aaron Francis is coming??!

  • @Chris-on5bt
    @Chris-on5bt 3 дня назад

    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.

  • @elderofzion
    @elderofzion 3 дня назад

    When are you dumping zig/rust/go/c++ and switching to php, prime?

  • @mrc1500
    @mrc1500 4 дня назад

    A lot of grandstanders on transmit in the chat when they should be on receive only. Thanks for calling them out.

  • @electricshmoo
    @electricshmoo 3 дня назад

    We've come a long way baby!!!

  • @julendominadas4040
    @julendominadas4040 4 дня назад

    Attributes are for metadata. You can get them with reflection API. to me, they feel similar to annotations

  • @taiwbi
    @taiwbi 3 дня назад +1

    I really love PHP

  • @benderbg
    @benderbg 4 дня назад +5

    What is dead may never die.
    PHP: Hello there

  • @GeorgeDrakakis78
    @GeorgeDrakakis78 3 дня назад +1

    Imagine Taylor Otwell & Adam Wathan are the 2 dudes that will help Prime to build the php thing => EASILY around 1 zilion views.

    • @drcphd
      @drcphd 3 дня назад

      Love that you mentioned Wathan. He's very inspiring to watch

  • @andreyashgaliev9372
    @andreyashgaliev9372 4 дня назад

    I’m waiting for the Ruby (Rails) session to hear comments about whether it’s horrible or not

  • @Vecusum
    @Vecusum 15 часов назад

    TIL: Baby dev theprimagen doesn't know about XPath, which was the DOM manipulation standard in the XML era.

  • @colbr6733
    @colbr6733 4 дня назад

    Great as long as I like sustaining work and am not worried about performance.

    • @SkylearJ
      @SkylearJ 4 дня назад +2

      Modern PHP can run up there with the best of em. Perf argument is a skill issue.

    • @SXsoft99
      @SXsoft99 3 дня назад +1

      ah yes because JAVA devs think about performance when they request extra RAM sticks to be inserted into the server rack

  • @marna_li
    @marna_li 3 дня назад

    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.

  • @bzboii
    @bzboii 4 дня назад +3

    is php pronounced “fap” or “pahoop”

  • @jacksmith1098
    @jacksmith1098 3 дня назад

    Missed opportunity to say pragmagean at the outro

  • @stonedoubt
    @stonedoubt 4 дня назад +22

    I love writing php. I'm sorry, but it is elegant imo.

    • @ristekostadinov2820
      @ristekostadinov2820 4 дня назад

      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.

    • @danielmdev
      @danielmdev 4 дня назад +3

      and robust

    • @greenjello421
      @greenjello421 4 дня назад

      I struggle looking at functions with underscores in them. Sorry but I disagree with you

    • @stonedoubt
      @stonedoubt 4 дня назад +1

      @ 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. 🫣

    • @mitigozman-pop2
      @mitigozman-pop2 4 дня назад

      ​@@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

  • @tambow44
    @tambow44 4 дня назад

    BC is a unix program “basic calculator”. Cool homage.

  • @code-island
    @code-island 3 дня назад

    Good video Prime,
    Laraval is the best framework ecosystem from far. ( I used
    to hate php )

  • @cyclonustv
    @cyclonustv 3 дня назад

    The name... is the pragmagen. I can't believe he didn't use it.

  • @paulmcburney6874
    @paulmcburney6874 3 дня назад

    Not gonna lie. I clicked on this video primarily because of the cat.

  • @minecraftermad
    @minecraftermad 3 дня назад

    missed chance to say the name is pragmagen

  • @Tattersail
    @Tattersail 4 дня назад

    i had to type the dollar sign for five years. i'm not gonna do it anymore, you can't make me

  • @ankk98
    @ankk98 4 дня назад

    It was so funny to watch him bounce while writing code

  • @MrEspecialGames
    @MrEspecialGames 4 дня назад +12

    PHP > RUBY

    • @lazymass
      @lazymass 4 дня назад +3

      To be fair, it's easy to be better than ruby

    • @TheRealCornPop
      @TheRealCornPop 4 дня назад +2

      Nah, the syntax is horrible. public private(set)?
      Ruby's syntax for getters setters is 1000x better

    • @Ismar3
      @Ismar3 4 дня назад +2

      @@TheRealCornPop if you said C# then I would agree, but Ruby is just way worse than this.

    • @fred.flintstone4099
      @fred.flintstone4099 3 дня назад

      Anything is better than Ruby. Maybe not Perl or Tcl?

  • @henrywooddk
    @henrywooddk 3 дня назад +1

    @primetime PHP does support arrow functions !

  • @Zutraxi
    @Zutraxi 15 часов назад

    So php is trying to catch in terms of semi modern functionality? As a non php dev I am scratching my head.

  • @learnwebdevelopment8869
    @learnwebdevelopment8869 4 дня назад +1

    🔥

  • @WiseWeeabo
    @WiseWeeabo 3 дня назад

    Someone needs to make an EUPHP where $ is replaced by €.

  • @kahnfatman
    @kahnfatman 4 дня назад

    pHP goes down the road of get/set hell.

  • @nlgachu7536
    @nlgachu7536 2 дня назад

    PHP: replaces xpath with CSS quering so you do not have to learn new unnecessary language
    Prime: I don´t get it

  • @gatisozols
    @gatisozols 4 дня назад

    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..

  • @ofmouseandman1316
    @ofmouseandman1316 4 дня назад

    2 person? Aaron and Taylor?

  • @JosephCodette
    @JosephCodette 4 дня назад

    Yes you will hear more and more about php, and laravel of course

  • @oleksiistri8429
    @oleksiistri8429 14 часов назад

    trustme, dollar sign is a BIG deal, when you entering it thousands of times eachday everyday, at some point it becomes so annoying!

  • @evergreen-
    @evergreen- 4 дня назад

    We’re still trying to migrate from PHP 7.4 to PHP 8.1

    • @SkylearJ
      @SkylearJ 4 дня назад +1

      How is your code base that poorly designed sheesh

    • @evergreen-
      @evergreen- 3 дня назад

      @ 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.

    • @drcphd
      @drcphd 3 дня назад

      ​@@evergreen-Ouch. Luckily I can still boot up my 10 year old PHP project without issues, but my 2 year old JS is another story. 90 % of the tooling doesn't exist anymore

  • @mattshu
    @mattshu 4 дня назад

    lmao bro I have to sub if he puts his audience on the spot when they comment something

  • @dhruvildhamecha2003
    @dhruvildhamecha2003 День назад

    I think many people still prefer React and Laravel stack cause you know php servers are way cheap then node so if php 8.4 having this changes it can also change the further version of Laravel too I myself also worked 2 react and Laravel project so it's not bad

  • @Tony_Sol
    @Tony_Sol 4 дня назад

    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

    • @XDarkGreyX
      @XDarkGreyX 4 дня назад

      Enlighten us regards

    • @lucasayabe
      @lucasayabe 3 дня назад

      @@XDarkGreyX you like encapsulation for your methods and properties right? It would be really cool if we had this at module level right? Well in PHP all the classes are public, so you couldn't do that.

  • @sophiophile
    @sophiophile 4 дня назад +1

    What about hack?

  • @Johanthegnarler
    @Johanthegnarler 4 дня назад +1

    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.

  • @rogerdeutsch5883
    @rogerdeutsch5883 4 дня назад

    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...

    • @SXsoft99
      @SXsoft99 3 дня назад +1

      and you are saying bad code can't be written in other languages? Have you ever coded in js?

    • @stefanalecu9532
      @stefanalecu9532 3 дня назад

      You're aware this applies to any codebase you inherit, right? How does this apply to PHP?

  • @duckydude20
    @duckydude20 4 дня назад

    i thought Prime was frontend dev???

  • @CallousCoder
    @CallousCoder День назад

    Hidden function calls and hidden program flows are the devil imo

  • @albertoarmando6711
    @albertoarmando6711 4 дня назад

    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.