PHP 7 abandoned properties
PHP4 style constructor
Functions in PHP4 in class with the same name as the class name, this feature was abandoned in PHP7 while will issue a E_DEPRECATED error. When the method name with the same name as the class, and the class is not in the namespace, at the same time PHP5 constructor (__construct) does not exist, it will produce a E_DEPRECATED error.
Examples
Examples
class A {
function A () {
print ( 'Style Constructor');
}
}
?>
The above program execution output 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...
Statically invoke a non-static method
Statically invoke a non-static method is no longer supported:
Examples
Examples
class A {
function b () {
print ( 'Non-static call' );
}
}
A :: b ();
?>
The above program execution output is:
Deprecated: Non-static method A::b() should not be called statically in... Non-static call
password_hash () random factor options
Function no longer need to provide the original amount of salt by the developer. The default function of internal capacity with salt, without developers salt value.
capture_session_meta SSL context options
Abandoned "capture_session_meta" SSL context options. Encryption-related metadata on the stream resource activities can stream_get_meta_data () return value of access.