两种方法: 1. 将php的版本切换到PHP7; 2. 将php代码中的函数定义中的参数定义的变量类型删除了。 function test(string $x){ // .... } 即将string直接删除即可