From PHP 5.6 to PHP 8.2

  Рет қаралды 14,266

Nuno Maduro

Nuno Maduro

Күн бұрын

Пікірлер: 57
@ahmedyoussef7923
@ahmedyoussef7923 10 ай бұрын
PHP getting better every new version . Thank you very much ❤
@Apocalyarts
@Apocalyarts Жыл бұрын
Wow, very nice and a super compact rundown, thx!
@nunomaduro
@nunomaduro Жыл бұрын
Thank you!
@waltermelo1033
@waltermelo1033 Жыл бұрын
that thumb reflect my thoughts. I'm really considering migrate from JS to PHP too...
@nunomaduro
@nunomaduro Жыл бұрын
Try Laravel.
@FreddieOmega
@FreddieOmega Жыл бұрын
awesome explanations!
@nunomaduro
@nunomaduro Жыл бұрын
Thank you!
@coder_one
@coder_one Жыл бұрын
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 Жыл бұрын
PHPstan will help with this
@TheRafark
@TheRafark Жыл бұрын
This would be caught when unit testing. If this is caught in production it means you don’t test your code, which is wild
@phpannotated
@phpannotated Жыл бұрын
❤ PHP
@it-s-me-mohit
@it-s-me-mohit Жыл бұрын
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
@jadidlar4765
@jadidlar4765 Жыл бұрын
thank you for your video
@nunomaduro
@nunomaduro Жыл бұрын
You welcome!
@DeTechDivus
@DeTechDivus Жыл бұрын
Would've been nice if we could remove empty {} as well
@GAoctavio
@GAoctavio Жыл бұрын
I think proper standard engine support for async, futures, coroutines and threading is due
@maxymajzr
@maxymajzr Жыл бұрын
What would you use threading for? I'm interested to know what you have going on as challenge with which threading helps.
@GAoctavio
@GAoctavio Жыл бұрын
@@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 Жыл бұрын
Have you tried reactphp?
@GAoctavio
@GAoctavio Жыл бұрын
@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 Жыл бұрын
@@GAoctavioyou can use pthreads, But generally I recommend to use something like Golang for heavy workload and offloading these parts.
@mmahgoub
@mmahgoub Жыл бұрын
TypeScript is that you?
@LeoSpabo
@LeoSpabo Жыл бұрын
What is the ABC app in the Menubar?
@spicynoodle7419
@spicynoodle7419 Жыл бұрын
You sbould have showed off the algebraic types like string|null or Arryable&Responsable
@nunomaduro
@nunomaduro Жыл бұрын
Yeah - but wanted keep the example simple.
@silva-dsd
@silva-dsd Жыл бұрын
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 Жыл бұрын
brew.sh/
@silva-dsd
@silva-dsd Жыл бұрын
@@nunomaduro Yes, I have been using it, however sometimes changes require a restart. Thanks anyway.
@lucasj.pereira4912
@lucasj.pereira4912 Жыл бұрын
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);
@DrYouz
@DrYouz Жыл бұрын
What is your font used in your IDE please ?
@DrYouz
@DrYouz Жыл бұрын
You like but you tell me :)
@DrYouz
@DrYouz Жыл бұрын
?
@brandon26
@brandon26 Жыл бұрын
Do you know of any performance improvements in this new versión?
@SaiyanJin85
@SaiyanJin85 Жыл бұрын
The only thing that is missing is typed arrays.
@nunomaduro
@nunomaduro Жыл бұрын
With PHPStan, we support those.
@jamesrosemary2932
@jamesrosemary2932 Жыл бұрын
Sitll waiting for setters and getters.
@dominiq6864
@dominiq6864 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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 Жыл бұрын
PHP became a great and robust programming language! What a shame it's dying 😆
@nunomaduro
@nunomaduro Жыл бұрын
It's not dying. 👍🏻
@mateussantana4418
@mateussantana4418 Жыл бұрын
@@nunomaduro it was a joke 😄
@levyroth
@levyroth Жыл бұрын
It was never great, and it will never be. Let it die.
@nunomaduro
@nunomaduro Жыл бұрын
@@levyroth Over my dead body
@muhammadawwab4402
@muhammadawwab4402 Жыл бұрын
@@levyroth you would die first
PHP 8.3 will fix readonly classes
6:08
Nuno Maduro
Рет қаралды 2,7 М.
Stressless: Stress Testing for PHP
10:18
Nuno Maduro
Рет қаралды 11 М.
Andro, ELMAN, TONI, MONA - Зари (Official Audio)
2:53
RAAVA MUSIC
Рет қаралды 8 МЛН
The Lost World: Living Room Edition
0:46
Daniel LaBelle
Рет қаралды 27 МЛН
PHP 8.4 Is Good
15:18
ThePrimeTime
Рет қаралды 144 М.
PHP doesn't suck (anymore)
10:48
Aaron Francis
Рет қаралды 213 М.
Automated Refactoring With Rector
7:51
php[architect]
Рет қаралды 2,7 М.
TypeScript Data Types - JavaScript, Typescript, Python, Go & Rust
1:27:17
Using Generics with PHP
25:55
Laracasts
Рет қаралды 16 М.
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 40 М.
Avoid Database Cascade Deletes and Default Values - Here’s Why
4:59
Refactor "Senior" PHP Code with Early Returns
12:09
Laravel Daily
Рет қаралды 27 М.
Embedded Rust setup explained
23:03
The Rusty Bits
Рет қаралды 99 М.