Deprecated features in PHP 7

Deprecated features in PHP 7

Even though PHP 7.0 is a new major version, efforts have been made to make migration as painless as possible. This release focuses mainly on removing functionality deprecated in previous versions and improving language consistency.

PHP 4 style constructors

The above example will output:

Static calls to non-static methods

Static calls to methods that are not declared static are deprecated, and may be removed in the future.

The above example will output:

password_hash() salt option

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.

capture_session_meta SSL context option

The capture_session_meta SSL context option has been deprecated. SSL metadata is now available through the stream_get_meta_data() function.

LDAP deprecations

The following function has been deprecated:
1. ldap_sort()

In the next article I will discuss about PHP 7 New features.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *