Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

PHP New Syntax in Latest Versions

Premium
4 min read

PHP has been updated with quite a few syntax options in recent years. Let's highlight some of them and see if you're using them.


PHP 7.4 (released in Nov 2019)

Typed Properties

class Post {
public string $title;
}

The property $title will have to be only a string.

Arrow Functions

A second new feature introduced in PHP 7.4 is...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 14 min)

You also get:

54 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

CL
Colin le roux ✓ Link copied!

my 5 cents worth There are differences in the outputs of -v or --version eg php artisan -v or php artisan --version I just got into the habbit of using --version as -v actual calls verbose which often provides more detailed information about its execution etc and not just the version number which is what we are chasing 99% of the time