This course is archived!

This tutorial uses Symfony 3, but all the concepts around PHP 7 are still ?valid.

> OOP >

Course Overview

Login to bookmark this course

PHP 7: The Important Stuff

Boost your PHP prowess exploring PHP 7's important aspects like scalar type declarations and return types.

  • 1119 students
  • EN Captions
  • EN Script
  • Certificate of Completion

Your Guides

About this course

This tutorial uses Symfony 3, but all the concepts around PHP 7 are still ?valid.

What PHP libraries does this tutorial use?

// composer.json
{
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.3.*", // v3.3.18
        "doctrine/orm": "^2.5", // v2.7.2
        "doctrine/doctrine-bundle": "^1.6", // 1.10.3
        "doctrine/doctrine-cache-bundle": "^1.2", // 1.3.2
        "symfony/swiftmailer-bundle": "^2.3", // v2.5.4
        "symfony/monolog-bundle": "^2.8", // v2.12.1
        "symfony/polyfill-apcu": "^1.0", // v1.3.0
        "sensio/distribution-bundle": "^5.0", // v5.0.19
        "sensio/framework-extra-bundle": "^3.0.2", // v3.0.25
        "incenteev/composer-parameter-handler": "^2.0", // v2.1.2
        "knplabs/knp-markdown-bundle": "^1.4", // 1.5.1
        "doctrine/doctrine-migrations-bundle": "^1.1", // v1.2.1
        "stof/doctrine-extensions-bundle": "^1.2", // v1.2.2
        "composer/package-versions-deprecated": "^1.11" // 1.11.99
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0", // v3.1.4
        "symfony/phpunit-bridge": "^3.0", // v3.2.8
        "nelmio/alice": "^2.1", // v2.3.1
        "doctrine/doctrine-fixtures-bundle": "^2.3", // v2.4.1
        "symfony/web-server-bundle": "3.3.*"
    }
}

PHP 5 is dead! So it's finally time to look at PHP 7 and learn all about the important stuff it brings. We're talking about scalar type declarations, return types, and the spaceship operator! Actually, not that last thing - there is a new spaceship operator (<=>) in PHP 7, but other than having a cool name... it's not really very important. Instead, we'll focus on:

  • Scalar type declarations and return types
  • Nullable types
  • Void types
  • Class constant visibility
  • New error and exception handling

And, PHP7 is fast! So let's get to it!

Next courses in the OOP: Go Further section of the OOP Track!

6 Comments

Sort By
Login or Register to join the conversation
Default user avatar Scott 6 years ago

Cheers guys

1 | Reply |
Lionel-F avatar Lionel-F 3 years ago

Hi guys, do you plan to do a php 8 tutorial with the upcoming SF6 release (which will support php8 at least) ?

| Reply |

Hey Lionel F.!

Hmm, I honestly hadn't thought about it much yet, but that's a pretty good idea - a quick PHP 8 bootcamp people could use as they start using Symfony 6. Perhaps also with 8.1 features on top if it (Symfony 6 will only require 8.0, but 8.1 will release nearly the same day).

We'll talk it over with the team - thanks for the suggestion!

1 | Reply |

I'd love to see that too :)

| Reply |
Default user avatar Micheal 6 years ago

But I want to hear about the spaceship operator. :'( ;)

| Reply |

Hahaha, maybe it'll make a quick cameo appearance ;)

3 | Reply |

Delete comment?

Share this comment

astronaut with balloons in space

"Houston: no signs of life"
Start the conversation!