Answers for "php function nullable return types"

PHP
0

php 7.1 functions parameters with "?"

function sayHello(?string $name) {
    echo "Hello " . $name . PHP_EOL;
}
sayHello(null); // Hello
sayHello("John"); //Hello John
Posted by: Guest on November-19-2020

Code answers related to "php function nullable return types"

Browse Popular Code Answers by Language