Skip to content

wizelineacademy/php-8-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hello, PHP 8.0!

PHP 8.0 is coming soon! This repository contains examples of various new features for you to experiment with. It also includes some helper scripts to make it easier to run examples using either PHP 7 or PHP 8 (to take advantage of these you will need to have Docker installed locally).

Running Scripts via Docker

So long as you have installed Docker, you should be able to run scripts using either PHP 7 or PHP 8 as follows (this assumes you are in the project root):

bin/php8 examples/test.php

You can alternatively specify bin/php7 though, of course, many examples that rely on the latest features from PHP 8 will not run successfully if you do this (but it could still be useful if you want to run some comparisons of your own).

Note that the first time you run bin/php7 or bin/php8 there may be some "noise" while Docker pulls down the latest image layers, etc. On subsequent runs this generally will not happen.

If you attended the corresponding Wizeline Academy presentation ("Exciting Changes in PHP 8.0" on September 17, 2020) you may also be interested in the code snippets contained in the examples/presentation directory. These match the code used during the live webinar, however they are far less detailed than those in the main examples directory and may make less sense by themselves.

Useful Online Resources

You may find the following links useful when researching changes in PHP 8 (these are all third party resources, and are not controlled by us):

Have fun!

About

Examples of new language features introduced by PHP 8.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages