double_metaphone()函数在PECL扩展中定义,因此PHPStorm无法看到它被定义.我不希望看到任何关于此的警告.我假设我可以让PHPStorm通过某种注释来定义这个函数调用,但我不知道如何实现这一点.
你需要所谓的"存根文件":
.php文件并将其放在项目的任何位置(无论是项目本身..还是作为一些外部库(设置| PHP |包含路径) - 无关紧要,只要PhpStorm可以在此项目中看到它).这正是PHP函数/类/等已知的所有知识首先在PhpStorm中完成的:只需要Ctrl + Click在任何标准函数/类/常量上,并自己查看.
一个例子:如何bin2hex定义标准函数:
<?php
/**
* (PHP 4, PHP 5)<br/>
* Convert binary data into hexadecimal representation
* @link http://php.net/manual/en/function.bin2hex.php
* @param string $str <p>
* A character.
* </p>
* @return string the hexadecimal representation of the given string.
*/
function bin2hex ($str) {}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
815 次 |
| 最近记录: |