PHP 7 deprecated features
PHP 7 obsolete feature
PHP4 style constructor
In PHP4, the function in the class can have the same name as the class name. This feature is Deprecated in PHP7 and will issue an E_DEPRECATED error. When the method name is the same as the class name, the class is not in the namespace, and the PHP5 constructor (__construct) does not exist, an E_DEPRECATED error will be generated.
Example
Example
The execution output of the above program is:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in...
##Call non-static methods in a static way With Calling non-static methods in a static way is no longer supported: Instance
Instance
The output result of the above program execution is:
Deprecated: Non-static method A::b() should not be called statically in...
##password_hash() random factor Options
Non-static call