4
function backtrace() {
var_dump(debug_backtrace());
}
function echosth($what = 'default text') {
echo $what;
backtrace();
}
echosth('another text'); //argument is shown
// ["args"]=> array(1) {[0]=>&string(12) "another text"}
echosth(); //it appears as function has none arguments ["args"]=>array(0) {}
有什麼辦法可以達到父功能的默認值?如何回溯默認函數參數?
你是第一個。 – rsk82