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

后端 未结 4 2022
名媛妹妹
名媛妹妹 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 09:16

    Doing what you suggest doesn't seem to work.

    You can do it like this, but I'm not sure why you want to do it and that there isn't a better approach to what you are trying to achieve - see Wrikken's answer.

提交回复
热议问题