开发者

PHP: how to detect current column in code (eq. __COLUMN__)?

开发者 https://www.devze.com 2023-02-17 20:08 出处:网络
I need to get unique identificator for current place of function call in code (for using it in template).

I need to get unique identificator for current place of function call in code (for using it in template). So, i need 开发者_开发问答something like:

$uid = __FILE__ . __LINE__ . __COLUMN__;
Does PHP have anything like __COLUMN__?


I don't think so, no.

There is no mention of such a thing in the magic constants section of the manual.

However, it stands to reason one shouldn't be needing that too badly. If a line of source code is so long that it needs the column number as an information, it should probably be broken up.

0

精彩评论

暂无评论...
验证码 换一张
取 消