可选参数值

函数

<?php

function sayGoodby(string $message = "Goodby!") {
    echo $message, "\n";
}

SayGoodby();
//输出 "Goodby!"

SayGoodby("see you");
//输出 "see you"