PHP 8.3 Codex Changelog

Newly added Improvements Changed Deprecations Removals
INI Directives 3 5 1
Constants 51 1 7
Attributes 1
Classes 10
Functions 12 39 1
Enums 1

Newly added

INI Directives

Global

Constants

curl

openssl

PDO_ODBC

pgsql

posix

sockets

Attributes

Core

Classes

ext-date

ext-sqlite3

Functions

ext-json

ext-ldap

ext-mbstring

ext-pgsql

ext-posix

ext-sockets

Core

Enums

ext-random

Deprecations

INI Directives

Global

  • assert.warning

    INI directive deprecated: assert.warning INI setting is deprecated

  • assert.exception

    INI directive deprecated: assert.exception INI setting is deprecated

  • assert.callback

    INI directive deprecated: assert.callback INI setting is deprecated

  • assert.bail

    INI directive deprecated: assert.bail INI setting is deprecated

  • assert.active

    INI directive deprecated: assert.active INI setting is deprecated

Functions

Core

Constants

intl

  • U_MULTIPLE_DECIMAL_SEPERATORS

    Constant deprecated

    var_dump(U_MULTIPLE_DECIMAL_SEPERATORS);
    // 65793
    Constant U_MULTIPLE_DECIMAL_SEPERATORS is deprecated

random

  • MT_RAND_PHP

    Constant deprecated

    var_dump(MT_RAND_PHP);
    // 1
    Constant MT_RAND_PHP is deprecated

standard

  • ASSERT_EXCEPTION

    Constant deprecated

    var_dump(ASSERT_EXCEPTION);
    // 5
    Constant ASSERT_EXCEPTION is deprecated
  • ASSERT_WARNING

    Constant deprecated

    var_dump(ASSERT_WARNING);
    // 4
    Constant ASSERT_WARNING is deprecated
  • ASSERT_ACTIVE

    Constant deprecated

    var_dump(ASSERT_ACTIVE);
    // 1
    Constant ASSERT_ACTIVE is deprecated
  • ASSERT_CALLBACK

    Constant deprecated

    var_dump(ASSERT_CALLBACK);
    // 2
    Constant ASSERT_CALLBACK is deprecated
  • ASSERT_BAIL

    Constant deprecated

    var_dump(ASSERT_BAIL);
    // 3
    Constant ASSERT_BAIL is deprecated

Removals

INI Directives

Global

Improvements

Functions

ext-gd

  • imagegd2
    • Parameter default value changed for position #3 ($chunk_size): <default> to 128
    • Parameter default value changed for position #4 ($mode): <default> to IMG_GD2_RAW
      imagegd2(
          GdImage $image,
          ?string $file = null,
    -     int $chunk_size = <default>,
    +     int $chunk_size = 128,
    -     int $mode = <default>
    +     int $mode = IMG_GD2_RAW
        ): bool
  • imagerotate
    • Parameter count changed: 4 to 3
    • Optional parameter removed - #4: bool $ignore_transparent = false
     imagerotate(
         GdImage $image,
         float $angle,
    -    int $background_color,
    -    bool $ignore_transparent = false
    +    int $background_color
       ): GdImage|false

ext-imap

  • imap_clearflag_full

    Return type changed: bool to true

      imap_clearflag_full(
          IMAP\Connection $imap,
          string $sequence,
          string $flag,
          int $options = 0
    -   ): bool
    +   ): true
  • imap_close

    Return type changed: bool to true

    - imap_close(IMAP\Connection $imap, int $flags = 0): bool
    + imap_close(IMAP\Connection $imap, int $flags = 0): true
  • imap_delete

    Return type changed: bool to true

      imap_delete(
          IMAP\Connection $imap,
          string $message_nums,
          int $flags = 0
    -   ): bool
    +   ): true
  • imap_expunge

    Return type changed: bool to true

    - imap_expunge(IMAP\Connection $imap): bool
    + imap_expunge(IMAP\Connection $imap): true
  • imap_gc

    Return type changed: bool to true

    - imap_gc(IMAP\Connection $imap, int $flags): bool
    + imap_gc(IMAP\Connection $imap, int $flags): true
  • imap_setflag_full

    Return type changed: bool to true

      imap_setflag_full(
          IMAP\Connection $imap,
          string $sequence,
          string $flag,
          int $options = 0
    -   ): bool
    +   ): true
  • imap_undelete

    Return type changed: bool to true

      imap_undelete(
          IMAP\Connection $imap,
          string $message_nums,
          int $flags = 0
    -   ): bool
    +   ): true

ext-intl

  • intlcal_set_repeated_wall_time_option

    Return type changed: bool to true

    - intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool
    + intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): true
  • intlcal_set_skipped_wall_time_option

    Return type changed: bool to true

    - intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool
    + intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): true
  • intlcal_set_minimal_days_in_first_week

    Return type changed: bool to true

    - intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool
    + intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): true
  • intlcal_set_lenient

    Return type changed: bool to true

    - intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool
    + intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): true
  • intlcal_set_first_day_of_week

    Return type changed: bool to true

    - intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool
    + intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): true
  • intlcal_clear

    Return type changed: bool to true

    - intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool
    + intlcal_clear(IntlCalendar $calendar, ?int $field = null): true
  • intlcal_set

    Return type changed: bool to true

      intlcal_set(
          IntlCalendar $calendar,
          int $year,
          int $month,
          int $dayOfMonth = <default>,
          int $hour = <default>,
          int $minute = <default>,
          int $second = <default>
    -   ): bool
    +   ): true
  • datefmt_set_timezone

    Return type changed: ?bool to bool

    - datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool
    + datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): bool

ext-mysqli

  • mysqli_field_seek

    Return type changed: bool to true

    - mysqli_field_seek(mysqli_result $result, int $index): bool
    + mysqli_field_seek(mysqli_result $result, int $index): true

ext-odbc

  • odbc_autocommit
    • Parameter type changed for parameter #2 ($enable): bool to ?bool
    • Parameter default value changed for position #2 ($enable): false to null
    - odbc_autocommit($odbc, bool $enable = false): int|bool
    + odbc_autocommit($odbc, ?bool $enable = null): int|bool

ext-pgsql

  • pg_untrace

    Return type changed: bool to true

    - pg_untrace(?PgSql\Connection $connection = null): bool
    + pg_untrace(?PgSql\Connection $connection = null): true
  • pg_trace
    • Optional parameter added - #4: int $trace_mode = 0
     pg_trace(
         string $filename,
         string $mode = "w",
    -    ?PgSql\Connection $connection = null
    +    ?PgSql\Connection $connection = null,
    +    int $trace_mode = 0
       ): bool
  • pg_close

    Return type changed: bool to true

    - pg_close(?PgSql\Connection $connection = null): bool
    + pg_close(?PgSql\Connection $connection = null): true

ext-posix

  • posix_getrlimit

    Added new optional parameter: $resource

    - posix_getrlimit(): array|false
    + posix_getrlimit(?int $resource = null): array|false

ext-random

  • mt_srand
    • Parameter type changed for parameter #1 ($seed): int to ?int
    • Parameter default value changed for position #1 ($seed): <default> to null
    - mt_srand(int $seed = <default>, int $mode = MT_RAND_MT19937): void
    + mt_srand(?int $seed = null, int $mode = MT_RAND_MT19937): void
  • srand
    • Parameter type changed for parameter #1 ($seed): int to ?int
    • Parameter default value changed for position #1 ($seed): <default> to null
    - srand(int $seed = <default>, int $mode = MT_RAND_MT19937): void
    + srand(?int $seed = null, int $mode = MT_RAND_MT19937): void

ext-session

  • session_set_save_handler
    • Parameter type changed for parameter #7 ($create_sid): callable to ?callable
    • Parameter default value changed for position #7 ($create_sid): <default> to null
    • Parameter type changed for parameter #8 ($validate_sid): callable to ?callable
    • Parameter default value changed for position #8 ($validate_sid): <default> to null
    • Parameter type changed for parameter #9 ($update_timestamp): callable to ?callable
    • Parameter default value changed for position #9 ($update_timestamp): <default> to null
      session_set_save_handler(
          $open,
          $close = <default>,
          callable $read = <default>,
          callable $write = <default>,
          callable $destroy = <default>,
          callable $gc = <default>,
    -     callable $create_sid = <default>,
    +     ?callable $create_sid = null,
    -     callable $validate_sid = <default>,
    +     ?callable $validate_sid = null,
    -     callable $update_timestamp = <default>
    +     ?callable $update_timestamp = null
        ): bool

ext-snmp

  • snmp_set_enum_print

    Return type changed: bool to true

    - snmp_set_enum_print(bool $enable): bool
    + snmp_set_enum_print(bool $enable): true
  • snmp_set_oid_numeric_print

    Return type changed: bool to true

    - snmp_set_oid_numeric_print(int $format): bool
    + snmp_set_oid_numeric_print(int $format): true
  • snmp_set_oid_output_format

    Return type changed: bool to true

    - snmp_set_oid_output_format(int $format): bool
    + snmp_set_oid_output_format(int $format): true
  • snmp_set_quick_print

    Return type changed: bool to true

    - snmp_set_quick_print(bool $enable): bool
    + snmp_set_quick_print(bool $enable): true
  • snmp_set_valueretrieval

    Return type changed: bool to true

    - snmp_set_valueretrieval(int $method): bool
    + snmp_set_valueretrieval(int $method): true

Core

  • natcasesort

    Return type changed: bool to true

    - natcasesort(array &$array): bool
    + natcasesort(array &$array): true
  • rsort

    Return type changed: bool to true

    - rsort(array &$array, int $flags = SORT_REGULAR): bool
    + rsort(array &$array, int $flags = SORT_REGULAR): true
  • range
    • Parameter type added for parameter #1 ($start): string|int|float
    • Parameter type added for parameter #2 ($end): string|int|float
      range(
    -     $start,
    +     string|int|float $start,
    -     $end,
    +     string|int|float $end,
          int|float $step = 1
        ): array
  • strrchr
    • Optional parameter added - #3: bool $before_needle = false
    -strrchr(string $haystack, string $needle): string|false
    +strrchr(
    +    string $haystack,
    +    string $needle,
    +    bool $before_needle = false
    +  ): string|false
  • natsort

    Return type changed: bool to true

    - natsort(array &$array): bool
    + natsort(array &$array): true

ext-xml

  • xml_parser_get_option

    Return type changed: string|int to string|int|bool

    - xml_parser_get_option(XMLParser $parser, int $option): string|int
    + xml_parser_get_option(XMLParser $parser, int $option): string|int|bool

ext-zlib

  • inflate_init

    Parameter type changed for parameter #2 ($options): array to object|array

    - inflate_init(int $encoding, array $options = []): InflateContext|false
    + inflate_init(int $encoding, object|array $options = []): InflateContext|false
  • deflate_init

    Parameter type changed for parameter #2 ($options): array to object|array

    - deflate_init(int $encoding, array $options = []): DeflateContext|false
    + deflate_init(int $encoding, object|array $options = []): DeflateContext|false

Changed

Constants

pcre

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.