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: 6 months 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");

For more information send a message to info at phpclasses dot org.