What's new in PHP 8.0

preview_player
Показать описание
In this video I cover most of the changes made in PHP8.0.

Table of Contents
----------------------------
00:00 - Introduction
00:40 - Just-In-Time (JIT)
02:56 - Project setup
04:41 - Names Arguments
10:12 - Union Types
12:34 - Constructor Property Promotion
14:03 - Null-Safe Operator
16:36 - Trailing Comma in Parameters
17:51 - Match Expression
19:51 - Attributes
35:18 - WeakMaps
42:05 - Mixed Type
43:15 - Throw Exception From New Places
44:07 - Call ::class on objects
44:26 - Non-Capturing Catch
45:08 - New String Functions
45:48 - Summary

------------------AUDIO GEAR I USE--------------------

------------------CHEAP AUDIO SETUP------------------

Follow me on social media:

Check my Github:
Рекомендации по теме
Комментарии
Автор

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

Nakatengga
Автор

I just loved the nullsafe operator .. that's will help a lot

JulianoGiacomeli
Автор

Thanks I needed this after being away from PHP for a few years. Awesome job!!

marvindawson
Автор

Thank you for demonstrating those cool features of php 8.0! :)

kristinanikiforova
Автор

Thank you so much for demistification JIT compiler. You simply show 2 images and I finally feel that I understand the benefits of JIT.

pack
Автор

World's best server side script!!! Love it :)

peterkovinski
Автор

Looks like best features from python, typescript, ES6... 👍👌

SagarGuhe
Автор

Excellent recap of PHP8 . Well and simply explained.

NicChap
Автор

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.

EduardoWeidmanBarijan
Автор

others: PHP IS DEAD


me: Hello 8.0

menjil
Автор

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

MuhammadBilal-bqkw
Автор

ლომი ხარ ლომი.
ასე გააგრძელე, წარმატებები

zubabo
Автор

Thanks for the video. Hope cPanels will have it soon.

ayaneshsarkar
Автор

PHP is like the first love, you hate it when you get over it

bonapart
Автор

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.

AbhinavKulshreshtha
Автор

Awesome video! The features are made very clear by your examples!

jessekoerhuis
Автор

Thank you for the video, was nice to see Georgian scripts on the screen :)

martirosyanara
Автор

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.

CrackerWeb
Автор

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.

music-unleashed
Автор

HI, what phpStorm interface theme do you use? How can i get same looking phpStorm?

HDKinoCool