Answer

问题及解答

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;

Posted by haifeng on 2020-09-29 18:18:15 last update 2020-09-29 18:21:57 | Edit | Answers (0)

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;

 

解决办法:

比如在类 page 中, 将同名函数 function page(){} 改为 public function __construct(){} 即可.

class page 
{

public function __construct($array)
 //function page($array)
{}

}

 

请参考

https://stackoverflow.com/questions/37100373/php-deprecated-methods-with-the-same-name