php7.0.x废弃的功能-PHP7

资源魔 36 0

php 7.0.x烧毁的性能

PHP4 格调的结构函数

PHP4 格调的结构函数(办法名以及类名同样)将被弃用,并正在未来移除了。 假如正在类中仅应用了 PHP4 格调的结构函数,PHP7 会孕育发生 E_DEPRECATED 正告。 假如还界说了 __construct() 办法则没有受影响。

<?php
class foo {
    function foo() {
        echo 'I am the constructor';
    }
}
?>

以上例程会输入:

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) 挪用未申明成 static 的办法,将来可能会彻底移除了该性能。

<?php
class foo {
    function bar() {
        echo 'I am not static!';
    }
}
foo::bar();
?>

以上例程会输入:

Deprecated: Non-static method foo::bar() should not be called statically in - on line 8
I am not static!

password_hash() 盐值选项

烧毁了 password_hash() 函数中的盐值选项,阻止开发者天生本人的盐值(通常更没有平安)。 开发者没有传该值时,该函数本人会天生明码学平安的盐值。因而再无须要传入本人自界说的盐值。

capture_session_meta SSL 上下文选项

烧毁了 capture_session_meta 内的 SSL 上下文选项。 如今能够经过 stream_get_meta_data() 猎取 SSL 元数据(metadata)。

LDAP 中的烧毁

如下函数已被烧毁:

ldap_sort()

保举教程:《PHP7》《PHP教程》

以上就是php7.0.x烧毁的性能的具体内容,更多请存眷资源魔其它相干文章!

标签: PHP7 php7开发教程 php7开发资料 php7开发自学

抱歉,评论功能暂时关闭!