PHP 8.6 Codex Changelog

Newly added Improvements Changed Deprecations Removals
INI Directives 1 3
Classes 24 1
Constants 34 3 2
Functions 14 26 26
Enums 14
Interfaces 1

Changed

INI Directives

Global

Classes

ext-soap

  • SoapClient

    Cloning class objects is no longer allowed

Constants

gd

Newly added

INI Directives

Global

Constants

curl

mysqli

openssl

pgsql

sockets

standard

Classes

ext-date

ext-intl

ext-openssl

Core

ext-uri

Functions

ext-gmp

ext-intl

ext-mysqli

ext-snmp

Core

Enums

ext-snmp

Core

ext-uri

Interfaces

Core

Improvements

Functions

ext-gd

  • imageaffinematrixget

    Parameter type added for parameter #2 ($options): array|float

    - imageaffinematrixget(int $type, $options): array|false
    + imageaffinematrixget(int $type, array|float $options): array|false

ext-json

ext-ldap

  • ldap_free_result

    Return type changed: bool to true

    - ldap_free_result(LDAP\Result $result): bool
    + ldap_free_result(LDAP\Result $result): true

ext-openssl

  • openssl_sign
    • Optional parameter added - #6: int $salt_length = OPENSSL_RSA_PSS_SALTLEN_AUTO
     openssl_sign(
         string $data,
         &$signature,
         $private_key,
         string|int $algorithm = OPENSSL_ALGO_SHA1,
    -    int $padding = 0
    +    int $padding = 0,
    +    int $salt_length = OPENSSL_RSA_PSS_SALTLEN_AUTO
       ): bool
  • openssl_encrypt

    Parameter type changed for parameter #7 ($aad): string to ?string

      openssl_encrypt(
          string $data,
          string $cipher_algo,
          string $passphrase,
          int $options = 0,
          string $iv = "",
          &$tag = null,
    -     string $aad = "",
    +     ?string $aad = "",
          int $tag_length = 16
        ): string|false
  • openssl_decrypt

    Parameter type changed for parameter #7 ($aad): string to ?string

      openssl_decrypt(
          string $data,
          string $cipher_algo,
          string $passphrase,
          int $options = 0,
          string $iv = "",
          ?string $tag = null,
    -     string $aad = ""
    +     ?string $aad = ""
        ): string|false
  • openssl_verify
    • Optional parameter added - #6: int $salt_length = OPENSSL_RSA_PSS_SALTLEN_AUTO
     openssl_verify(
         string $data,
         string $signature,
         $public_key,
         string|int $algorithm = OPENSSL_ALGO_SHA1,
    -    int $padding = 0
    +    int $padding = 0,
    +    int $salt_length = OPENSSL_RSA_PSS_SALTLEN_AUTO
       ): int|false

ext-pgsql

  • pg_close_stmt

    Parameter type changed for parameter #1 ($connection): Pgsql\Connection to PgSql\Connection

    - pg_close_stmt(Pgsql\Connection $connection, string $statement_name): PgSql\Result|false
    + pg_close_stmt(PgSql\Connection $connection, string $statement_name): PgSql\Result|false

ext-readline

  • readline_completion_function

    Return type changed: bool to true

    - readline_completion_function(callable $callback): bool
    + readline_completion_function(callable $callback): true

ext-snmp

  • snmp_set_oid_numeric_print

    Parameter type changed for parameter #1 ($format): int to Snmp\OidOutput|int

    - snmp_set_oid_numeric_print(int $format): true
    + snmp_set_oid_numeric_print(Snmp\OidOutput|int $format): true
  • snmp_set_oid_output_format

    Parameter type changed for parameter #1 ($format): int to Snmp\OidOutput|int

    - snmp_set_oid_output_format(int $format): true
    + snmp_set_oid_output_format(Snmp\OidOutput|int $format): true

ext-sockets

  • socket_cmsg_space

    Return type changed: ?int to int

      socket_cmsg_space(
          int $level,
          int $type,
          int $num = 0
    -   ): ?int
    +   ): int
  • socket_addrinfo_lookup
    • Optional parameter added - #4: &$error_code = null
     socket_addrinfo_lookup(
         string $host,
         ?string $service = null,
    -    array $hints = []
    +    array $hints = [],
    +    &$error_code = null
       ): array|false

Core

ext-zip

  • zip_entry_close

    Return type changed: bool to true

      #[\Deprecated]
    - zip_entry_close($zip_entry): bool
    + zip_entry_close($zip_entry): true

Deprecations

Functions

ext-mbstring

ext-mysqli

ext-SPL

Core

Constants

mbstring

  • MB_ONIGURUMA_VERSION

    Constant deprecated

    var_dump(MB_ONIGURUMA_VERSION);
    // 6.9.9
    Constant MB_ONIGURUMA_VERSION is deprecated since 8.6, because the underlying library is no longer maintained

standard

  • SORT_LOCALE_STRING

    Constant deprecated

    var_dump(SORT_LOCALE_STRING);
    // 5
    Constant SORT_LOCALE_STRING is deprecated since 8.6, use one of the Collator::*sort*() methods instead
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.