[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage Articles Article Series: PHP 8.x

Article Series: PHP 8.x

Jan 30, 2023 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

PHP continues to be one of the most widely used scripting languages on the web, with 77.3% of all the websites whose server-side programming language is known using it, according to w3tech. PHP 8 brings many new features and improvements, which we shall explore in this article series.

PHP 8 is a major update to PHP that introduces new features and improvements in all of the language areas, such as expressions, classes, functions, operators, and more.

New expression-related syntax include attributes, match expression, the instanceof operator, and the new operator.

Speaking of new features related to classes, PHP 8 brings:

  • Enums, a layer over classes to specify an enumerated list of possible values for a type
  • The new readonly modifier for a class property, which makes the property unmodifiable after its initialization
  • Constructor parameter promotion, useful to assign a constructor parameter value to an object property automatically.

PHP 8.0 also adds support for several functions- and methods-related features, including enhanced callables, named function arguments, and Fibers, interruptible functions adding support for multitasking.

Improvements to PHP type system include: union, intersection, and mixed types, as well as the static and never return types. Additionally, PHP 8 also brings support for true, null, and false stand-alone types.

Series Contents

1

PHP 8 - Attributes, Match Expression and Other Improvements

PHP 8 is a major update to PHP that introduces several new features and performance optimizations, including attributes, match expression, instanceof operator, new operator, a new JIT compiler, etc.

2

PHP 8 - Classes and Enums

In this article, we will review new PHP 8 features related to classes, including enums, the new readonly modifier for a class property, and constructor parameter promotion.

3

PHP 8 – Functions and Methods

PHP 8.0 adds support for several functions- and methods-related features, including enhanced callables, named function arguments, and Fibers, interruptible functions adding support for multitasking.

4

PHP 8 - Type System Improvements

In this article we will discuss improvements to PHP types including union, intersection, and mixed types, as well as the static and never return types, and the true, null, and false stand-alone types.

5

PHP 8 - Arrays, Variables, Operators, Exception Handling and More

In this article, we discuss new features brought by PHP 8 related to arrays, variables, operators, and exception handling. We also discussed some trait-, class-, and function-related features. This article concludes the PHP 8 article series.

6

What's New in PHP 8.3

Besides performance improvements, PHP 8.3 brings a many new features, including amendments to the existing readonly feature; explicitly-typed class constants; a new #[Override] attribute, and more.

About the Author

Deepak Vohra

Show moreShow less

Rate this Article

Adoption
Style

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /