پی اچ پی

امکانات جدید PHP نسخه ی 7.1

What's New in PHP 7.1

Though not as flashy as the long-in-development 7.0 release, PHP 7.1 nonetheless brings with it a number of useful features, ranging from short array destructuring, to negative string offsets, to improved return types. Come along, as we review what's new in PHP!

سطح مبتدی 5 جلسه آموزشی 00:19:00 ساعت
01
قسمت 1

Install PHP 7.1

Before we can toy around with the new additions to PHP 7.1, we must first install it. In the past, this was always a pain in the neck to accomplish; however, these days, we only need to pull in Rasmus' Vagrant image to get up and running as quickly a...

02
قسمت 2

Symmetric Array Destructuring

First up, we have symmetric array destructuring: an incredibly confusing term for a simple concept: we can now use the short array syntax to translate (or destructure) any array - both indexed and associative - into a list of variables.

03
قسمت 3

Nullable and Void Types

Nullable and void types are both new to PHP 7.1. Should you desire to, you may now mark a typehint or return type as being nullable, simply by prefixing it with a question mark. This indicates that you expect either the given type, or null. Additiona...

04
قسمت 4

Multi-Catch Exception Handling

Often, you'll find yourself catching and responding to multiple exception types with the exact same logic. In PHP 7.1, however, you may now remove this duplication by separating each exception type with a pipe (catch (ChargeFailed | InsufficientFunds...

05
قسمت 5

Iterables

New to PHP 7.1 is a new iterable pseudo-type. If you're currently type-hinting array all over the place, think about it: would you be that upset if the user instead passed an object that can be iterated over? Of course not. This new pseudo-type solve...

دوره در حال اجرا

این دوره هنوز به پایان نرسیده است و در آینده درس های دیگری به آن افزوده خواهد شد.