PHP Classes

Learn New PHP 8 Features: Examples of how to use PHP 8 new features

Recommend this page to a friend!
  Info   View files Example   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-12 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 171 This week: 1All time: 8,739 This week: 172Up
Version License PHP version Categories
php-8 1.0.0BSD License8Language, PHP 8
Description Author

This package provides examples of how to use PHP 8 new features.

It provides several script and classes that demonstrate how to use PHP 8 new features. Currently it shows features like:

- Call class function accessing the object class

- Promoting values passed to class constructor to class object properties

- Using the match expression to assign values according to patterns that an input value matches

- Functions that can return mixed values

- Functions with named arguments

- Catching exceptions without using the exception object that is thrown

- Call classes only of the objects are not null

- Throwing exceptions with any type of value

- Defining functions with parameter lists that can end with a comma

- Taking class function parameters that can be of multiple classes

Innovation Award
PHP Programming Innovation award winner
January 2022
Winner
PHP 8 introduces many excellent features that PHP developers want.

To take advantage of those features, you need to learn more about them.

One way to learn about PHP 8 new features is to see some code examples of using those features in practice.

This package provides example scripts that show how to use PHP 8 new features calling PHP classes taking advantage of those features.

Manuel Lemos
Picture of Allan Kibet
Name: Allan Kibet <contact>
Classes: 4 packages by
Country: United Kingdom
Age: ???
All time rank: 2484115 in United Kingdom
Week rank: 163 Up6 in United Kingdom Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details

php-8

Learning new PHP 8 features

  Files folder image Files  
File Role Description
Files folder image.idea (4 files)
Plain text file call_class_static_on_object.php Class Class source
Plain text file constructor_property_promotion.php Class Class source
Accessible without login Plain text file match_expression.php Aux. Auxiliary script
Accessible without login Plain text file mixed_return_types.php Aux. Auxiliary script
Accessible without login Plain text file named_arguments.php Aux. Auxiliary script
Accessible without login Plain text file non_capturing_catch.php Example Example script
Plain text file null_safe_operator.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file throw_exception.php Example Example script
Accessible without login Plain text file trailing_comma.php Aux. Auxiliary script
Accessible without login Plain text file union_types.php Example Example and class source

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file php8.iml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:171
This week:1
All time:8,739
This week:172Up
For more information send a message to info at phpclasses dot org.