5 Reasons to Use PHP 8: New Syntax Features

preview_player
Показать описание
Are you still on PHP 7.x? Let me convince you to upgrade, maybe you will like those syntax "treats" from PHP 8.0.

PHP 8 Examples from the video:

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

The null safe operator is the reason I made the switch right away. I love it in Javascript too 😉

Stoney_Eagle
Автор

Null safe, promoted properties, named arguments, mixed/union type, all the goodies!
Wrote it before even watching, just from what I use every day

marcusgaius
Автор

Already on PHP 8, and I love it so much.

ericbitim
Автор

Nice. Thanks for the update. match would be a time saver!

celebritydev
Автор

man i love your videos no unnecessary jokes or comment straight to the point

akarimdad
Автор

Named arguments sound pretty useful, I often used arrays as arguments for the same reason.

glurper
Автор

i switched to mern stack since one year, this brings me years of memories with php

gerard
Автор

the null safe operator by itself is worth upgrading

coltonwilliams
Автор

Using PHP 8 since it was released. Just too much difference between 7.* and 8.0, you also didn't mention performance which is much better comparing to 7.4

alexaverkiyev
Автор

I skipped to PHP 8 after release and just learned new features as I went by, I'm using laragon and recently switched to 8.1(R C 5) after seeing a tweet by Tailor. I have done so many projects in php 8 that I automatically write in PHP 8 syntax.

MonethiTebohoArthurnacious
Автор

Personally using 8 but due (my) to packages in open source, I still have to support from 7.4, also been planning to upgrade to 8.1 when the time comes.

GamePlayByFaks
Автор

Yes, I still use php 7, but thank you for this video.

eugenstakhursky
Автор

As soon as php8 came out, i used it right away .

baadrqaaba
Автор

PHP 8 is recent addition, and big projects takes years to build up. Live servers are provisioned with the stack at the project started with, after a while many more projects gets added to the same server. It's not that easy to shift language per project on production as much of a hassle. Dockerizing is not always the luxury.

BsiennKhan
Автор

I've migrated a big application from 7.3 to 7.4, and taken into account the changes to 8.0 as well, wasn't that many. I used phpcompatibility and phpstorm inspect to find all the possible issues and fixed them. Didn't take me more than a couple of days. I've got pretty good coverage with phpunit so getting a stable release was no big deal. The added features is great!
Note that the adoption rate may also be inhibited by red hat enterprise, since you need to upgrade the os in order to use newer versions of php with their extnended support.

imqqmi
Автор

could you provide us with examples of using exceptions via php 8 through laravel ? such as using arrow functions/null coalescing operator

juve
Автор

I like some of the new syntax. Setting up objects with types defined by classes should be nice. I’ve not tried it yet.
One issue I’ve not got my head around yet is how much time and how often to put into updates that are not for security each year. It is an extra cost for clients but allows moving forward faster but clients are not yet used to having to keep upgrades at many levels of stack without benifit to them that they can see in an app. Any thoughts on selling that and upgrade cycles?

TristanBailey
Автор

I still use 7.4 on most of my projects. Has a special place in my heart somehow. 😅

nullvd
Автор

since January 2021 using PHP8 for new projects

CerberusApg
Автор

The ice breaker for me was match, it’s awesome

InfiraGen