- PHP 7 - Removed Extensions & SAPIs
- PHP 7 - Deprecated Features
- PHP 7 - Session Options
- PHP 7 - Integer Division
- PHP 7 - Error Handling
- PHP 7 - use Statement
- PHP 7 - Expectations
- PHP 7 - CSPRNG
- PHP 7 - IntlChar
- PHP 7 - Filtered unserialize()
- PHP 7 - Closure::call()
- PHP 7 - Anonymous Classes
- PHP 7 - Constant Arrays
- PHP 7 - Spaceship Operator
- PHP 7 - Null Coalescing Operator
- PHP 7 - Return Type Declarations
- PHP 7 - Scalar Type Declarations
- PHP 7 - Environment Setup
- PHP 7 - Performance
- PHP 7 - Introduction
- PHP 7 - Home
PHP 7 Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
PHP 7 - Deprecated Features
Following features are deprecated and may be removed from future releases of PHP.
PHP 4 style constructors
PHP 4 style Constructors are methods having same name as the class they are defined in, are now deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes implementing a __construct() method are unaffected.
Example
<?php class A { function A() { print( Style Constructor ); } } ?>
It produces the following browser output −
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...
Static calls to non-static methods
Static calls to non-static methods are deprecated, and may be removed in the future.
Example
<?php class A { function b() { print( Non-static call ); } } A::b(); ?>
It produces the following browser output −
Deprecated: Non-static method A::b() should not be called statically in... Non-static call
password_hash() salt option
The salt option for the password_hash() function has been deprecated so that the developers do not generate their own (usually insecure) salts. The function itself generates a cryptographically secure salt, when no salt is provided by the developer - thus custom salt generation is not required any more.
capture_session_meta SSL context option
The capture_session_meta SSL context option has been deprecated. SSL metadata is now used through the stream_get_meta_data() function.
Advertisements