Тёмный

From PHP 5.6 to PHP 8.2 

Nuno Maduro
Подписаться 6 тыс.
Просмотров 13 тыс.
50% 1

This is the "From PHP 5.6 to PHP 8.2" segment from my "What's new in PHP 8.3 " livestream. Watch the full livestream here: www.youtube.co....
----------------------------------------------------------------------------------------------------
- Twitter: / enunomaduro
- Threads: www.threads.ne...
- Mastodon: mastodon.socia...
- LinkedIn: / nunomaduro
- RU-vid: / nunomaduro
- GitHub: github.com/nun...
- Bluesky: bsky.app/profi...
- Tiktok: / enunomaduro

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@ahmedyoussef7923
@ahmedyoussef7923 5 месяцев назад
PHP getting better every new version . Thank you very much ❤
@Apocalyarts
@Apocalyarts 11 месяцев назад
Wow, very nice and a super compact rundown, thx!
@nunomaduro
@nunomaduro 11 месяцев назад
Thank you!
@it-s-me-mohit
@it-s-me-mohit 9 месяцев назад
Great video nuno. I had one question. I have a legacy PHP application version 5.4 using zend, symfony, restler rtc. Wanted to upgrade it to the latest version. Is it better to rewrite it from scratch in a new framework like laravel or migrate everything and stay on the same frameworks
@waltermelo1033
@waltermelo1033 7 месяцев назад
that thumb reflect my thoughts. I'm really considering migrate from JS to PHP too...
@nunomaduro
@nunomaduro 7 месяцев назад
Try Laravel.
@phpannotated
@phpannotated 11 месяцев назад
❤ PHP
@lucasj.pereira4912
@lucasj.pereira4912 11 месяцев назад
Now we only need the constructor to make the "{ }" optional because a lot of times it is just empty. Like we have in interfaces: public function __constructor (public string $name);
@coder_one
@coder_one 11 месяцев назад
Certainly, to check whether you can override the variable $name marked as "readonly" or placed in the "readonly" class, you still need to run this code. That's how PHP works... You find out about existing errors in the code from clients using the production application ;)
@spicynoodle7419
@spicynoodle7419 11 месяцев назад
PHPstan will help with this
@TheRafark
@TheRafark 10 месяцев назад
This would be caught when unit testing. If this is caught in production it means you don’t test your code, which is wild
@FreddieOmega
@FreddieOmega 11 месяцев назад
awesome explanations!
@nunomaduro
@nunomaduro 11 месяцев назад
Thank you!
@shalakadeshan
@shalakadeshan 11 месяцев назад
Great video Nuno 👏. Hopes PHP never ceased to improve and evolve. PHP should provide an easy and smooth transition for developers. What tool you used to change php version easily, using mac?
@nunomaduro
@nunomaduro 11 месяцев назад
brew.sh/
@shalakadeshan
@shalakadeshan 11 месяцев назад
@@nunomaduro Yes, I have been using it, however sometimes changes require a restart. Thanks anyway.
@jadidlar4765
@jadidlar4765 11 месяцев назад
thank you for your video
@nunomaduro
@nunomaduro 11 месяцев назад
You welcome!
@DeTechDivus
@DeTechDivus 11 месяцев назад
Would've been nice if we could remove empty {} as well
@DrYouz
@DrYouz 10 месяцев назад
What is your font used in your IDE please ?
@DrYouz
@DrYouz 10 месяцев назад
You like but you tell me :)
@DrYouz
@DrYouz 10 месяцев назад
?
@SaiyanJin85
@SaiyanJin85 11 месяцев назад
The only thing that is missing is typed arrays.
@nunomaduro
@nunomaduro 11 месяцев назад
With PHPStan, we support those.
@spicynoodle7419
@spicynoodle7419 11 месяцев назад
You sbould have showed off the algebraic types like string|null or Arryable&Responsable
@nunomaduro
@nunomaduro 11 месяцев назад
Yeah - but wanted keep the example simple.
@mmahgoub
@mmahgoub 11 месяцев назад
TypeScript is that you?
@brandon26
@brandon26 11 месяцев назад
Do you know of any performance improvements in this new versión?
@user-sb7vv4bf6d
@user-sb7vv4bf6d 10 месяцев назад
What is the ABC app in the Menubar?
@jamesrosemary2932
@jamesrosemary2932 11 месяцев назад
Sitll waiting for setters and getters.
@GAoctavio
@GAoctavio 11 месяцев назад
I think proper standard engine support for async, futures, coroutines and threading is due
@maxymajzr
@maxymajzr 9 месяцев назад
What would you use threading for? I'm interested to know what you have going on as challenge with which threading helps.
@GAoctavio
@GAoctavio 9 месяцев назад
@@maxymajzr I'm currently generating loads of PDFs in parallel with Dompdf, the only way of not stalling the request for 15 minutes its to use Laravel Jobs but thats an architectural mess IMO (not very elegant to have an external program as supervisor, I found it breaks very often, doesn't reload the configuration properly, etc). In the end I replaced it with proc_open with correct command arguments to run the proper job, marshalling job data into the database as JSON. It would be trivial with a Thread Pool implementation, but I'd need to recompile the PHP interpreter and I don't know how fiddly the support is. Proper implementation and testing would take me a lot of time
@jmon24ify
@jmon24ify 9 месяцев назад
Have you tried reactphp?
@GAoctavio
@GAoctavio 9 месяцев назад
@jmon24ify Looks interesting but I don't how useful it would be with my problem since Dompdf doesn't really block aside from when writing to disk once it has processed everything and I'd have to write a new service to even begin to try
@winfle
@winfle 7 месяцев назад
@@GAoctavioyou can use pthreads, But generally I recommend to use something like Golang for heavy workload and offloading these parts.
@dominiq6864
@dominiq6864 11 месяцев назад
I really like the direction PHP is developed in recent years. But unfortunately, it still sucks (and sadly will suck forever). It still has: - The infamous inconsistent argument ordering: strpos($haystack, $needle, $offset) and array_search($needle, $haystack, $strict) - facepalm 🤦‍♂ - Lack of proper module system - importing all files to the global scope and bothering with complex namespaces is a nightmare - Awful ancient "
@8LynX8
@8LynX8 11 месяцев назад
You are right BUT: - Inconsistent argument ordering - YES, but it is not a big deal, when you are using modern IDE - Lack of proper module. Not sure what you mean, but it is solved by composer autoloader. Basically it is must have - "
@dominiq6864
@dominiq6864 11 месяцев назад
@@8LynX8 yeah, well I think backward compatibility causes most flaws of PHP, unfortunately 😅 I really hope they will eventually introduce more consistent APIs in future releases and deprecate old ones - then PHP would probably be one of the best server-side languages for backend devs
@b0janix
@b0janix 10 месяцев назад
I agree about the inconsistencies in the argument ordering, but since PHP 8 you have this thing called named arguments. So you just need to know the name of the argument passed to that function and you can place the arg anywhere in the param signature
@dominiq6864
@dominiq6864 10 месяцев назад
@@b0janix yeah, named arguments help a lot and I must admit that other languages should implement this feature as well (but this doesn't justify previous PHP's bad design decisions) Nevertheless I wish PHP will fix some of its flaws in future versions, maybe it is going to be great some day ;)
@GamePlayByFaks
@GamePlayByFaks 10 месяцев назад
seems you haven't used composer 2 and php 8.2 and some recent framework like laravel or symfony, about 90% of your issues are solved. add phpstan level 10 and strict type on top and you will never have any major issues in general.
@mateussantana4418
@mateussantana4418 11 месяцев назад
PHP became a great and robust programming language! What a shame it's dying 😆
@nunomaduro
@nunomaduro 11 месяцев назад
It's not dying. 👍🏻
@mateussantana4418
@mateussantana4418 11 месяцев назад
@@nunomaduro it was a joke 😄
@levyroth
@levyroth 11 месяцев назад
It was never great, and it will never be. Let it die.
@nunomaduro
@nunomaduro 11 месяцев назад
@@levyroth Over my dead body
@muhammadawwab4402
@muhammadawwab4402 11 месяцев назад
@@levyroth you would die first
Далее
PHP 8.3 will fix readonly classes
6:08
Просмотров 2,6 тыс.
Rust For PHP Developers
59:42
Просмотров 25 тыс.
Introducing iPhone 16 | Apple
02:00
Просмотров 4,5 млн
Bike vs Super Bike Fast Challenge
00:30
Просмотров 21 млн
▼ЮТУБ ВСЁ, Я НА ЗАВОД 🚧⛔
30:49
Просмотров 532 тыс.
PHP doesn't suck (anymore)
10:48
Просмотров 205 тыс.
PHP 8 3 Released
11:03
Просмотров 106 тыс.
VSCode is Not Enough Anymore in 2024
3:21
Просмотров 20 тыс.
How to Upgrade Older Projects to Laravel 10
7:52
Просмотров 29 тыс.
Stressless: Stress Testing for PHP
10:18
Просмотров 10 тыс.
What's New in PHP 8.3 - Derick Rethans
59:11
Просмотров 6 тыс.
New to Linux? Yeah, DON'T Use Manjaro...
15:55
Просмотров 207 тыс.