我想創建一個函數,參數取值爲「開」和「關」做一個函數依賴
public function test(on || off) {
if isset[test(on);] -> {echo "test";}
if isset[test(off);] -> {echo "test"; echo "<br>"; echo "great";}
}
最終的結果,我想是參數打印的東西:
public function test(on || off) {
if isset[test(on);] -> {function1();}
if isset[test(off);] -> {function1(); echo "<br>"; function2();}
}