php
tanruixing
这个作者很懒,什么都没留下…
展开
-
php 代码技巧
字符串模板化$name = 'tanrx';$msgContent = "hello, ${name}";eval( "\$msgContent = \"$msgContent\";" );输出 hello, tanrx提取$和花括弧的字符正则表达式"/(?:\\$\{)([^{}$]*)(?:\})/"原创 2020-10-21 11:13:09 · 146 阅读 · 0 评论 -
判断函数入参为空
public static function isFieldsEmpty($arrFields = array()) { $traceList = debug_backtrace(); array_shift($traceList); if (empty($traceList)) { Bd_Log::warning("ERROR no caller. backtrace list:" . json_encode(debug_b...原创 2020-08-28 19:56:59 · 899 阅读 · 0 评论