<?php
class Greeting {
static function sayGoodby(string $message = "Goodby!") {
echo $message, "\n";
}
static function sayHello(string $message = "Hello!") {
echo $message, "\n";
}
}
Greeting::sayGoodby();
//输出 "Goodby!"
Greeting::sayHello("Hi");
//输出 "Hi"