Ad
Fundamentals
Code
Diff
  • function greet_language(string $lang = "PHP"): string
    {
        return "Hello {$lang}!";
    }
    
    • function greet_language($lang = "PHP") {
    • print "Hello $lang!\n";
    • function greet_language(string $lang = "PHP"): string
    • {
    • return "Hello {$lang}!";
    • }
    • greet_language();
    • greet_language("Javascript");
    • greet_language("Ruby");