php 7.2 method arguments code example
Example: php 7.1 functions parameters with "?"
function sayHello(?string $name) {
echo "Hello " . $name . PHP_EOL;
}
sayHello(null); // Hello
sayHello("John"); //Hello John
function sayHello(?string $name) {
echo "Hello " . $name . PHP_EOL;
}
sayHello(null); // Hello
sayHello("John"); //Hello John