PHP4-style constructors (methods that have the same name as the class they are defined in)
are deprecated. PHP 7 will emit E_DEPRECATED
whenever a PHP 4 constructor
is defined. When the method name matches the class name, the class is not in a namespace,
and a PHP 5 constructor (__construct) is not present then an E_DEPRECATED
will be emitted.
<?php
class foo {
function foo() {
echo 'I am the constructor';
}
}
?>
The above example will output:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3
The salt option for the password_hash() function has been deprecated to prevent developers from generating their own (usually insecure) salts. The function itself generates a cryptographically secure salt when no salt is provided by the developer - therefore custom salt generation should not be needed.