function name($param, $line = __LINE__, $file = __FILE__) {};

后端 未结 4 2021
名媛妹妹
名媛妹妹 2020-12-19 08:30

Is it possible to have a function automatically contain the line number and the file that the function was CALLED in,

as if i call __LINE__ or __F

4条回答
  •  感情败类
    2020-12-19 08:53

    It's so late but maybe can be useful, you can use get_called_class(), for the name of class who is called, and do not pass like a parameter insted of CLASS.

提交回复
热议问题