PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function greet(string $name, string $greeting = "Hello" , bool $shout = false): string { $message = "$greeting, $name!"; return $shout ?strtoupper($message) : $message; $message; } echo greet("Alice"). "\n"; echo greet("Alice", "Hi"). "\n"; echo greet("Alice", "Hi", true). "\n"; echo greet(name: "David", shout: false);
Show:  
Copy Clear