PHP7.0 더 이상 사용되지 않는 기능

PHP 4 style constructors

PHP 4 스타일 생성자(정의된 클래스와 이름이 같은 메소드)는 더 이상 사용되지 않으며 향후 제거될 예정입니다. PHP 4 생성자가 클래스 내에서 정의된 유일한 생성자인 경우 PHP 7은 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 calls to non-static methods

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() salt option

password_hash() 함수에 대한 솔트 옵션은 개발자가 자신의(일반적으로 안전하지 않은) 솔트를 생성하는 것을 방지하기 위해 더 이상 사용되지 않습니다. 함수 자체는 개발자가 제공하는 솔트가 없을 때 암호로 안전한 솔트를 생성하므로 사용자 지정 솔트 생성이 필요하지 않습니다.


capture_session_meta SSL context option

capture_session_meta SSL 컨텍스트 옵션은 더 이상 사용되지 않습니다. 이제 stream_get_meta_data() 함수를 통해 SSL 메타데이터를 사용할 수 있습니다.


LDAP deprecations

다음 함수는 더 이상 사용되지 않습니다.