Skip to main content

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? (30 h 41 min)

You also get:

55 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

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.