PHPStorm代码检查和间接表达

时间:2016-03-05 23:36:14

标签: php phpstorm php-7

我正在为我们的插件开发PHP7兼容性,并注意到使用以下代码时它运行正常,没有警告或错误:

foreach ( $form_inputs as $order => $input_field ) {
                    $name = ucwords( str_replace( '_', ' ', $input_field['template'] ) );

                    Give_FFM_Admin_Template::{$input_field['template']}( $count, $name, $input_field );
                    $count ++;
                }

然而,PHPStorm并不喜欢括号:

enter image description here

我使用了以下推荐的语法:PHP7 method_exists Uncaught Error: Function name must be a string

非常感谢任何见解!

0 个答案:

没有答案
相关问题