小编ins*_*ns0的帖子

函数参数中出现尴尬的 PHP 类型错误

我定义了一个这样的函数:

   private function mediaExist(string $entry) { ...
Run Code Online (Sandbox Code Playgroud)

我收到这种类型的错误:

   ... must be an instance of string, string given, called in ...
Run Code Online (Sandbox Code Playgroud)

有什么帮助吗?

php types

2
推荐指数
1
解决办法
253
查看次数

标签 统计

php ×1

types ×1