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    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-12 (9 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 76 This week: 17All time: 9,844 This week: 12Up
Version License PHP version Categories
php-8 1.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

Picture of Allan Kibet
Name: Allan Kibet <contact>
Classes: 4 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 2x

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:76
This week:17
All time:9,844
This week:12Up
For more information send a message to info at phpclasses dot org.