I need a PHP function with default argument value , I don't need string value for default argument .
I need call some else functions as default argument value
for example :
class main {
public function get_Date(){
date_default_timezone_set('America/New_York');
return date('Y');
}
// My problem is here !
public function display_Time ($time = $this->get_Date()){
return $time ;
}
}
I can't transfer get_Date() value to $time variable as default argument value.
please help ME.