I\'m writing a function which requires some units of date, like \"hour\", \"minute\" and \"second\" but I would like to make these option and the server\'s current time is u
A default function argument should be a compile time constant. Or in PHP's case the value should be known to the PHP interpreter before executing the script.
Therefore you cannot directly use function result as a default argument
Thus only way is the null default argument method you already know.