This is the problem with all you php kids. Why on gods green earth would you want to promote building an mvc framework from scratch. I can possibly understand using an existing, well known php ecosystem to build a website. However, no one needs to build a MVC framework from scratch. That problem has been solved so many times. Spend less time reinventing wheels and more time improving/contributing to those that already exist.
@@toddzmijewski6002 I am against on this thinking because time to time there are new frameworks rise somewhere, can they be considered on what you said "existing"? and you confuse of the term "reinventing wheels", does it mean, newborn developer MUST not start from somewhere and remained on current state? The best way to understand is to create your own. Well if you are commission on a 3 months project them chose existing ones but for the sake of learning, don't limit to the word "Don't re-invent the wheel" even Human give birth to new Babies, which means to improved learn from others and start again.
named arguments were added not because you can forget the order of the arguments... the reason is to be able to provide only needed arguments and not specify arguments that have default value for example: public function foo(string $bar1 = 'bar1', string $bar2 = 'bar2', string $bar3 = 'bar3', string $bar4 = 'bar4') in 7.4 if you wanted to change `$bar4` you needed to provide all the previous arguments, but in php 8.0 you can do just that foo(bar4: 'bar5')
Hello bros i am new to php. I cant find any good videos to tell me the roadmao to learn php. Can you please tell me how should i go on to learn php what should i learn first ?? I already am doing projects in Html Css Java Script
Yep. Still remember being told to change to Ruby back in 2007. 13 years later, still plenty of 6 figure income jobs to be found requiring PHP. No language is perfect. Everyone pick what makes sense. A good programmer will thrive no matter their technology stack.
Nice explanation. I like to see the old code being refactored to the new code. But I didn't understand the Attributes portion. All I could understand is that it is something that frameworks will use and not my own code. I would like a video explaining it in more details with production-like code and what is the advantage of using Attributes. Thank you very much.
Greetings from Pakistan your are awesome teacher i am new to php my request to u is please use HTML in projects so people like me can easily understand. shopping cart tutorial is super but for me with out HTML it took much time to understand what is going on. so Please do me favour
Glad I'm not the only one. I get what they were going with but it seems overly complicated and dirty for very little gain.. although it's still new so I'm sure at some point I will see something really cool that uses it...
00:40 - 02:56 This is incorrect, you explained what OPCache is, not what JIT is. JIT attempts to generate Native machine code for a peice of code which would benifit from running nativly. Such as math operations or loops etc etc. OPCache and OPCode is not native machine code and still needs to be ran by the Zend engine, JIT'd code completely bypasses the Zend Engine and runs native CPU instructions. This is why the devs say you wont notice any performance increase from JIT if you dont type hint, because for the native cpu to be generated it needs to be strictly typed otherwise you can crash PHP or worse.
I worked on php for the first 10 years of my career. That is an accurate comparison. I don't know if its fair to contribute it all to the language though. The language prospered in a time of monolith CMS platforms. No other language has really created the same number of large, cms open source platforms. So I think much of dislike is linked through php via way of working on those large cms's which the modern industry has moved away from.
Amazing Video . To the point explanation. While the reddit world is debating if php is alive or not, php 8 is turning up to be as good as kotlin or Java. And here in my stupid job, we still maintain websites in php 5.4. I need to subscribe to your channel and see what you upload next.
Your composer.json already has psr-4 format to read the files in src, use namespace to read file, no need to use include or require. Nice video by the way.
So with the Attributes is it essentially just a fancy comment with syntax, meaning that it wont actually do anything unless some real code fetches then via reflection API and performers some task based on that information. Yes?
Nice video again! I never used ?? and = like you in the getReviews function (??=) at 39:42 ... I learned something new again, but seeing this I can understand why so much devs just hate PHP :) It wasn't obvious even for me at first.
That is actually part of PHP7.4. Yes, it might be confusing at first look, but I think this can't be reason why people hate PHP. Python has a lot of such "confusing" code which does things in 1 line 😀
Not at interpreter at moment but I think the # only marks a comment when it's followed by a space. Probably still does in PHP 8, for backward compatibility.
Hello Sir, you know, following your instructions in another of your videos, I stall PHP 7.4, now how can I updated to PHP 8 (I mean in Ubuntu 20.04)???
Excellent video, many thanks. FWIW I'd love to see a tutorial on using Vue3 with PHP8 (raw, no framework) for a simple real world PDO CRUD (blog?) example.
Congrats on this cool video. But please compare the intro sound effect with the volume of your voice. Maybe it's just my headphones, but sounds to me like you could raise your mic volume for your next vids
they make all complicated .i can not understand from 4 then 5 then 7 and now 8.....you learn a version and you master it and they come with new version ...it is silly
Named arguments seem kind of silly on its own. Would be creat if the could be used via unpacking an associative array into a method call with the keys used as argument names.
what i don't like about php is a lot of ambiguities, no strict rules and in this version they bring few more. why? it doesn't make language better, it makes language more prone to bugs.
Hey Zura, how are you doing? I hope you are doing well. Can you please do a video about php8 for desktop application under windows, I've done some research but most of the open source projects are outdated. If you have some knowledge of how to do something like this using php8, nginx and mysql. Thank you.
not entirely true on the match expression, 200 is treated like 300, same as in the switch, while you said nothing, but NULL’s not nothing, that would be a void.
I’m new to php . But I learned typescript and python and I’m new to backend dev in general. I could pickup php faster. How do I know when I’m ready to learn Laravel. I’m interested in making rest apis what framework’s do I use to do that
When you understand PHP basics, Oop, and general networking/programming concepts related to API developmen/web development then you should be good to at least get started with laravel.
@@navjotsingh2251 I do understand PHP basics but I tried learning OOP Design Patterns but I don't get them. I looked at all of them but I can't apply them at all. But I know that composition is simply better than inheritance and I understand REST API concepts.
Thank you for so fast updates for PHP 8. I just wondering - you using PHP storm and made changes in composer file updated to php 8, what about VS Code? If I understood correctly I just need to have composer file, update it to php 8 and all new features for php 8 on VS Code will work also?
Thank you. Putting "php": "^8.0" in composer.json does not mean that PHPStorm or VSCode support PHP8.0 syntax. I have installed latest PHPStorm (which I mention in the video as well). However I am not sure if VSCode extensions support PHP8.0 syntax yet. I have not tested.
@@TheCodeholic Thank you for answer. I will continue searching. P.s I find your tutorials and lessons really interesting and that yo u find time to be social active among IT community. Thank you again for sharing your knowledge.
@@TheCodeholic not only, union types, nullsafe operator (aka optional chaining) etc Attributes looks like ts decorators, WeakMap is long time in ES, mixed type in ts called any or unknown depending on use case (and that's actually good that they adopt good features)
Don't understand. Why this features make it 8.0, its more like 7.5? Most of those can help you a lot. Like if you write crappy code, now you can make it even crappier. We have to seriously rethink using php further. Its slowly and surely dying.
@@gtdmg489 This supports bad coding habits to tackle overload missing support. Just an real world example to avoid lengthy response : you got a function taking 3 args, but first and second are not required. So the function may be called like f(first, second, third) or f(second, third) or f(third) or f(first, third) or f(second). And inside the function there's some weird spagetti testing for each case using actual number of arg passed and type of each one to determine proper cas, then overwrittes args, then proceeds. This is a nightmare to debug, documentation is hard to make and to read. Not speaking of when the return type is mixed and you have to check 10 cases using is_* functions. Hope response is not confused
php is more than wordpress. Laravel is the most popular backend framework today. Symfony is another excellent php framework. Php also has popular e-commerce platforms.
It's too late for PHP to support JIT. The market has been dominated by other languages for pretty long time and it's hard for PHP to fight back nowadays.
@@waysonlin3809 That's right, but I believe lower salaries are because the market has more php developers to offer. The impressive improvements in performance since php6 and 7 are a good sign that php is here to stay and is getting ready for the future. :)
@@waysonlin3809 It is not only about wordpress. Laravel is the most popular web backend framework. With swoole, php is very much faster than node js at number of request per second.
I dont think the php 7.4/8.0 comparison was very helpful. All of us understand that php 8.0 syntax wont work in 7.4 Keep it to examples of ‘this is how we used to do it’ and ‘this is how we do it now’