https://blog.jetbrains.com/phpstorm/2018/03/how-to-provide-stubs-for-phpstorm/
https://github.com/JetBrains/phpstorm-stubs/blob/master/standard/_types.php
https://github.com/JetBrains/phpstorm-stubs
January 2017 Update: You can git clone (checkout) the PhpStorm stubs repository to your local machine, and point PhpStorm to that directory. From there you can add stubs or even modify/delete existing stubs.
git clone https://github.com/JetBrains/phpstorm-stubs
Open Preferences -> Languages & Frameworks -> PHP
Click Advanced Settings at the bottom
Next to Default stubs path, click the … and navigate to the root of your phpstorm-stubs folder
https://stackoverflow.com/questions/30328805/phpstorm-how-to-add-method-stubs-from-a-pecl-library-that-phpstorm-doesnt-curr
https://www.zhihu.com/question/24844900
https://www.cnblogs.com/fw6669998/p/10179412.html
https://www.kutu66.com/GitHub/article_125028