PHP Classes

File: trailing_comma.php

Recommend this page to a friend!
  Classes of Allan Kibet   Learn New PHP 8 Features   trailing_comma.php   Download  
File: trailing_comma.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Learn New PHP 8 Features
Examples of how to use PHP 8 new features
Author: By
Last change:
Date: 2 years ago
Size: 181 bytes
 

Contents

Class file image Download
<?php

// Function should allow trailing comma without error
function fn_with_params_trailing_comma(string $name,) {
   
var_dump($name);
}

fn_with_params_trailing_comma("James");