用php7mar检查我们的代码后,有一些条目报告中类似于以下内容:
#### /includes/classes/class.shopdb.php
* funcGetArg
* Line 206: ` $args = func_get_args();`
当我检查指定的文件和代码时,这就是我所拥有的:
if(func_num_args() > 1) {
$args = func_get_args();
foreach($args as &$item)
$item = ShopDB::quote($item);
$query = vsprintf(str_replace('?', '%s', $query), array_slice($args, 1));
}
我真的没觉得这里有什么不对。。。还有其他人吗?
经过一些搜索,func_get_args在php7中应该可以正常工作。php7mar报告中仍然有几行我不理解:
-
变量插值
-
370行:
return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);
-
第441行:
return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);
-
481行:
return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args, $this);
-
第63行:
$this->$row[0] = $row[1];
-
带有参考的新操作员
-
第53行:
* Remember to use ampersand when creating an OLE object ($my_ole =& new OLE();)