Readonly clones, #[Override], and json_validate: what's new in PHP 8.3

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

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

  • @phpannotated
    @phpannotated  Год назад +1

    New video is here about breaking changes and deprecations in PHP 8.3: ruclips.net/video/mGf_ShkSdmE/видео.html

  • @phpannotated
    @phpannotated  Год назад +5

    Make sure to subscribe! Next week I'll post a video about all deprecations and breaking changes in PHP 8.3: ruclips.net/video/mGf_ShkSdmE/видео.html

  • @mackynyxz
    @mackynyxz Год назад +1

    PHP is life!

  • @RoRtO
    @RoRtO Год назад

    Thanks for your useful reviews :)

  • @TheLogontothis
    @TheLogontothis Год назад +2

    Love the simple presentation in these videos. Solid minor release from PHP, Negative index counting _should_ be more obvious now rather cause bugs but lets see ¯\_(ツ)_/¯

  • @TomaszKane
    @TomaszKane Год назад +7

    json_validate looks useful...

    • @joeyboli
      @joeyboli 4 месяца назад

      yep it does.

  • @NedumEze
    @NedumEze Год назад

    Thanks for delivering.

  • @jelmerprins
    @jelmerprins Год назад

    Readonly clones!

  • @adnan-sy9ui
    @adnan-sy9ui Год назад

    I think that all these three major features are valuable and significant, though you mentioned static code analysis tools such as phpstan to validate the code, talking about #[Override], there are many projects out there that don't or can't use phpstan at its full potential or on all parts of their code, therefore I assume having such feature is a great benefit to have, from PHP 8.3 and more we know that the language itself prevents having pain in the neck silence errors on the code mainly when we use a third-party package.

    • @Mythix2
      @Mythix2 Год назад +1

      static analysis can not catch overrides, it doesnt know intent

  • @FGj-xj7rd
    @FGj-xj7rd Год назад +13

    I want PHP 9 to have async/await. I know its unlikely, but a man can dream.

    • @hmb8801
      @hmb8801 Год назад

      What's the difference between that and fiber?

    • @x0r1k
      @x0r1k Год назад +2

      it's impossible, PHP doesn't have main loop. You need something like swoole for that.

    • @FGj-xj7rd
      @FGj-xj7rd Год назад

      @@x0r1k *Sad PHP noises*

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Год назад

      Just switch to Python already. That’s what PHP is trying to become now anyway.

    • @dhkatz_
      @dhkatz_ Год назад +1

      ​@@x0r1k This isn't true. Python doesn't have a main event loop either but it still has great async/await features. Same with C#. You can just make your own event loop 🤷‍♂🤷‍♂ If PHP added async/await they would probably just add an asyncio builtin module like Python has.

  • @CottonInDerTube
    @CottonInDerTube Год назад

    Negative integer offsets: are they int|float, or just string (as i would expect it to be).

  • @Ultzer
    @Ultzer Год назад +1

    First! There is no link to the blog post in description :)

  • @Kaldrax
    @Kaldrax 9 месяцев назад

    I would expect an array index of -5 to be illegal in the first place.

  • @jokovBG
    @jokovBG 11 месяцев назад

    Sorry, but the explanation regarding negative indexes in arrays is incorrect. Starting from PHP 8.3, when adding a new item to an array with a negative index, the new item's index will be 0. However, this behavior does not apply to earlier versions of PHP.

    • @phpannotated
      @phpannotated  11 месяцев назад

      I think that's what I said, what do you think is incorrect?

  • @edwinshadian2852
    @edwinshadian2852 11 месяцев назад

    Hope this "override" java sh@t won't be necessary to use. I (and a lot of others) don't see any point for it. It seems like in our easy-to-do PHP Kingdom was brought a cart of unnecessary complications. Hope there will be no more java in my beloved PHP

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 Год назад

    Have they figured out lexical binding yet?
    Nope.

  • @laurentlegaz6286
    @laurentlegaz6286 10 месяцев назад

    I don't get why ppl wants to push to add bug in a working language ¯\_(ツ)_/¯