Deprecated feature in php 7.0.x
PHP4-style constructors
PHP4-style constructors (method names are the same as class names) are deprecated and will be removed in the future. PHP7 will generate an E_DEPRECATED warning if only PHP4-style constructors are used in a class. If the __construct() method is also defined, it will not be affected.
<?php class foo { function foo() { echo 'I am the constructor'; } } ?>
The above routine 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
Static call to non-static method
Abandoned Static call is not declared into a static method, this feature may be completely removed in the future.
<?php class foo { function bar() { echo 'I am not static!'; } } foo::bar(); ?>
The above routine will output:
Deprecated: Non-static method foo::bar() should not be called statically in - on line 8<br>I am not static!
password_hash() salt option
The salt option in the password_hash() function is obsolete. Prevent developers from generating their own salts (generally less secure). When the developer does not pass this value, the function itself will generate a cryptographically secure salt value. Therefore there is no need to pass in your own custom salt value.
capture_session_meta SSL context option
The SSL context option in capture_session_meta is obsolete. SSL metadata can now be obtained via stream_get_meta_data().
Deprecated in LDAP
The following functions have been deprecated:
ldap_sort()
Recommended Tutorial: "PHP7" "PHP Tutorial"
The above is the detailed content of php7.0.x deprecated features. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
