PHP 8. Quick Scripting Reference. PHP 8 Reference
248 pages
English
PDF
4.5

PHP 8. Quick Scripting Reference. PHP 8 Reference

PHP 8. Quick Scripting Reference. PHP 8 Reference

Author:

Year:

Summary:

Introduction

The book "PHP 8 Quick Scripting Reference" by Mikael Olsson was published in 2021 and is a compact yet comprehensive reference for the PHP version 8 language. This is the third edition in the Quick Scripting Reference series, which has been fully updated to reflect the innovations of PHP 8: attributes, named arguments, JIT compilation, an improved type system, and many others. In 248 pages, the author has covered both the basics of syntax and advanced topics, making the book an ideal assistant for quickly finding information and reviewing key concepts.

What the book is about

The book is structured on the principle of "from simple to complex" and covers all the main aspects of the PHP 8 language. It begins with installation and environment setup, then sequentially covers variables, data types, operators, control structures, functions, arrays, strings, classes, and objects. Special attention is paid to the innovations of PHP 8: attributes, named arguments, union types, mixed type, static return type, as well as improved error handling using the throw expression. Separate chapters are devoted to working with files, dates, regular expressions, exception handling, and generators. The book concludes with a brief overview of the PHP Standard Library (SPL) and tips for writing quality code.

Who this book is for

The book is aimed at a wide range of readers:

  • Beginner developers who want to quickly learn the syntax of PHP 8 and start writing simple scripts.
  • Experienced PHP programmers wishing to update their knowledge to version 8 and learn about new features.
  • Students and teachers who need a compact reference for learning or teaching a PHP course.
  • Backend developers transitioning from other languages (e.g., Python, Java, C#) to PHP.

What the reader will learn

After reading this book, the reader will be able to:

  • Install and configure PHP 8 on a local machine.
  • Understand and use all basic language constructs: variables, types, operators, loops, conditions.
  • Work with functions, including anonymous functions, arrow functions, and closures.
  • Create classes and objects, apply inheritance, interfaces, traits, and abstract classes.
  • Use new PHP 8 features: attributes, named arguments, union types, match expression, nullsafe operator.
  • Handle errors and exceptions using try-catch-finally and throw expression.
  • Work with the file system, dates, and regular expressions.
  • Apply generators and iterators for efficient work with large data.
  • Use the PHP Standard Library (SPL) to solve common tasks.

Strengths of the book

The book has a number of undeniable advantages:

  • Compactness and structure. Only 248 pages, but the information is presented densely, without unnecessary filler. Each chapter is a complete block of knowledge.
  • Relevance. The book fully corresponds to PHP version 8.0, which is rare for printed publications from 2021.
  • Practical focus. Many short code examples that can be immediately tested in the console or in an IDE.
  • Ease of use as a reference. Thanks to its clear structure and subject index, the book is easy to use for quickly finding a specific topic.
  • Accessible language. The author explains complex concepts in simple terms, without overloading the text with excessive theory.
  • Coverage of innovations. All key changes in PHP 8 are analyzed in detail, which is especially valuable for those transitioning from PHP 7.

Who it is recommended for

The book will be useful for anyone who wants to quickly and effectively learn PHP 8 or refresh their knowledge. I especially recommend it to:

  • Developers,

Recommendations