php8.5
Home/ Manual/ appendices / migration56/ Changed functions

Changed functions

crypt will now raise an E_NOTICE error if the salt parameter is omitted.

PHP Core

  • crypt() will now raise an E_NOTICE error if the salt parameter is omitted.
  • substr_compare() will now accept 0 for its length parameter.
  • unserialize() will now fail if passed serialised data that has been manipulated to attempt to instantiate an object without calling its constructor.

cURL

  • Uploads using the @file syntax are now only supported if the CURLOPT_SAFE_UPLOAD option is set to false. CURLFile should be used instead.

Mcrypt

  • The source parameter of mcrypt_create_iv() now defaults to MCRYPT_DEV_URANDOM instead of MCRYPT_DEV_RANDOM.

OpenSSL

  • stream_socket_enable_crypto() now allows the crypto_type parameter to be optional if the stream's SSL context includes the new crypto_type option.

PostgreSQL

Reflection

  • ReflectionClass::newInstanceWithoutConstructor now allows non-final internal classes to be instantiated.

XMLReader

  • XMLReader::getAttributeNs and XMLReader::getAttributeNo now return null if the attribute could not be found, like XMLReader::getAttribute.

Source: appendices/migration56/changed-functions.xml · from the official PHP manual (php/doc-en)