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
zend.reserved_stack_sizeINI directive added
opcache.jit_max_trace_lengthINI directive added
zend.max_allowed_stack_sizeINI directive added
Constants
curl
CURLWS_RAW_MODEConstant added
CURLKHMATCH_MISSINGConstant added
CURLOPT_WS_OPTIONSConstant added
CURLOPT_SSH_HOSTKEYFUNCTIONConstant added
CURLOPT_REDIR_PROTOCOLS_STRConstant added
CURLOPT_QUICK_EXITConstant added
CURLOPT_PROTOCOLS_STRConstant added
CURLOPT_MIME_OPTIONSConstant added
CURLOPT_CA_CACHE_TIMEOUTConstant added
CURLMIMEOPT_FORMESCAPEConstant added
CURLKHMATCH_OKConstant added
CURLKHMATCH_MISMATCHConstant added
CURLKHMATCH_LASTConstant added
CURLINFO_CAPATHConstant added
CURLINFO_CAINFOConstant added
openssl
PKCS7_NOOLDMIMETYPEConstant added
OPENSSL_CMS_OLDMIMETYPEConstant added
PDO_ODBC
PDO_ODBC_TYPEConstant added
pgsql
PGSQL_TRACE_REGRESS_MODEConstant added
PGSQL_SHOW_CONTEXT_NEVERConstant added
PGSQL_SHOW_CONTEXT_ERRORSConstant added
PGSQL_SHOW_CONTEXT_ALWAYSConstant added
PGSQL_ERRORS_SQLSTATEConstant added
posix
POSIX_PC_SYMLINK_MAXConstant added
POSIX_SC_PAGESIZEConstant added
POSIX_SC_NPROCESSORS_ONLNConstant added
POSIX_SC_NPROCESSORS_CONFConstant added
POSIX_PC_PIPE_BUFConstant added
POSIX_SC_ARG_MAXConstant added
POSIX_PC_ALLOC_SIZE_MINConstant added
POSIX_PC_CHOWN_RESTRICTEDConstant added
POSIX_PC_LINK_MAXConstant added
POSIX_PC_MAX_CANONConstant added
POSIX_PC_MAX_INPUTConstant added
POSIX_PC_NAME_MAXConstant added
POSIX_PC_NO_TRUNCConstant added
POSIX_PC_PATH_MAXConstant added
sockets
TCP_REPAIRConstant added
TCP_QUICKACKConstant added
IP_PMTUDISC_WANTConstant added
IP_PMTUDISC_PROBEConstant added
SO_DETACH_FILTERConstant added
IP_PMTUDISC_OMITConstant added
IP_PMTUDISC_INTERFACEConstant added
IP_PMTUDISC_DONTConstant added
SOL_UDPLITEConstant added
IP_PMTUDISC_DOConstant added
SO_DETACH_BPFConstant added
SO_ATTACH_REUSEPORT_CBPFConstant added
IP_MTU_DISCOVERConstant added
IP_BIND_ADDRESS_NO_PORTConstant added
Attributes
Core
OverrideAttribute added
Classes
ext-date
DateObjectErrorException class added
DateRangeErrorException class added
DateMalformedStringExceptionException class added
DateMalformedPeriodStringExceptionException class added
DateMalformedIntervalStringExceptionException class added
DateInvalidOperationExceptionException class added
DateInvalidTimeZoneExceptionException class added
DateErrorException class added
DateExceptionException class added
ext-sqlite3
SQLite3ExceptionException class added
Functions
ext-json
json_validateFunction added
ext-ldap
ldap_exop_syncFunction added
ext-mbstring
mb_str_padFunction added
ext-pgsql
pg_set_error_context_visibilityFunction added
ext-posix
posix_eaccessFunction added
posix_sysconfFunction added
posix_fpathconfFunction added
posix_pathconfFunction added
ext-sockets
socket_atmarkFunction added
Core
str_decrementFunction added
str_incrementFunction added
stream_context_set_optionsFunction added
Enums
ext-random
Random\IntervalBoundaryEnum added
Deprecations
INI Directives
Global
assert.warningINI directive deprecated:
assert.warningINI setting is deprecatedassert.exceptionINI directive deprecated:
assert.exceptionINI setting is deprecatedassert.callbackINI directive deprecated:
assert.callbackINI setting is deprecatedassert.bailINI directive deprecated:
assert.bailINI setting is deprecatedassert.activeINI directive deprecated:
assert.activeINI setting is deprecated
Functions
Core
assert_optionsFunction deprecated
Constants
intl
U_MULTIPLE_DECIMAL_SEPERATORSConstant deprecated
var_dump(U_MULTIPLE_DECIMAL_SEPERATORS); // 65793Constant U_MULTIPLE_DECIMAL_SEPERATORS is deprecated
random
MT_RAND_PHPConstant deprecated
var_dump(MT_RAND_PHP); // 1Constant MT_RAND_PHP is deprecated
standard
ASSERT_EXCEPTIONConstant deprecated
var_dump(ASSERT_EXCEPTION); // 5Constant ASSERT_EXCEPTION is deprecatedASSERT_WARNINGConstant deprecated
var_dump(ASSERT_WARNING); // 4Constant ASSERT_WARNING is deprecatedASSERT_ACTIVEConstant deprecated
var_dump(ASSERT_ACTIVE); // 1Constant ASSERT_ACTIVE is deprecatedASSERT_CALLBACKConstant deprecated
var_dump(ASSERT_CALLBACK); // 2Constant ASSERT_CALLBACK is deprecatedASSERT_BAILConstant deprecated
var_dump(ASSERT_BAIL); // 3Constant ASSERT_BAIL is deprecated
Removals
INI Directives
Global
opcache.consistency_checksINI directive removed
Improvements
Functions
ext-gd
imagegd2- Parameter default value changed for position #3 (
$chunk_size):<default>to128 - Parameter default value changed for position #4 (
$mode):<default>toIMG_GD2_RAW
imagegd2( GdImage $image, ?string $file = null, - int $chunk_size = <default>, + int $chunk_size = 128, - int $mode = <default> + int $mode = IMG_GD2_RAW ): boolimagerotate- Parameter count changed:
4to3 - Optional parameter removed - #4:
bool $ignore_transparent = false
imagerotate( GdImage $image, float $angle, - int $background_color, - bool $ignore_transparent = false + int $background_color ): GdImage|falseext-imap
imap_clearflag_fullReturn type changed:
booltotrueimap_clearflag_full( IMAP\Connection $imap, string $sequence, string $flag, int $options = 0 - ): bool + ): trueimap_closeReturn type changed:
booltotrue- imap_close(IMAP\Connection $imap, int $flags = 0): bool + imap_close(IMAP\Connection $imap, int $flags = 0): trueimap_deleteReturn type changed:
booltotrueimap_delete( IMAP\Connection $imap, string $message_nums, int $flags = 0 - ): bool + ): trueimap_expungeReturn type changed:
booltotrue- imap_expunge(IMAP\Connection $imap): bool + imap_expunge(IMAP\Connection $imap): trueimap_gcReturn type changed:
booltotrue- imap_gc(IMAP\Connection $imap, int $flags): bool + imap_gc(IMAP\Connection $imap, int $flags): trueimap_setflag_fullReturn type changed:
booltotrueimap_setflag_full( IMAP\Connection $imap, string $sequence, string $flag, int $options = 0 - ): bool + ): trueimap_undeleteReturn type changed:
booltotrueimap_undelete( IMAP\Connection $imap, string $message_nums, int $flags = 0 - ): bool + ): true
ext-intl
intlcal_set_repeated_wall_time_optionReturn type changed:
booltotrue- intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool + intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): trueintlcal_set_skipped_wall_time_optionReturn type changed:
booltotrue- intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool + intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): trueintlcal_set_minimal_days_in_first_weekReturn type changed:
booltotrue- intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool + intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): trueintlcal_set_lenientReturn type changed:
booltotrue- intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool + intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): trueintlcal_set_first_day_of_weekReturn type changed:
booltotrue- intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool + intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): trueintlcal_clearReturn type changed:
booltotrue- intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool + intlcal_clear(IntlCalendar $calendar, ?int $field = null): trueintlcal_setReturn type changed:
booltotrueintlcal_set( IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = <default>, int $hour = <default>, int $minute = <default>, int $second = <default> - ): bool + ): truedatefmt_set_timezoneReturn type changed:
?booltobool- datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): ?bool + datefmt_set_timezone(IntlDateFormatter $formatter, $timezone): bool
ext-mysqli
mysqli_field_seekReturn type changed:
booltotrue- 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):boolto?bool - Parameter default value changed for position #2 (
$enable):falsetonull
- odbc_autocommit($odbc, bool $enable = false): int|bool + odbc_autocommit($odbc, ?bool $enable = null): int|boolext-pgsql
pg_untraceReturn type changed:
booltotrue- pg_untrace(?PgSql\Connection $connection = null): bool + pg_untrace(?PgSql\Connection $connection = null): truepg_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 ): boolpg_closeReturn type changed:
booltotrue- pg_close(?PgSql\Connection $connection = null): bool + pg_close(?PgSql\Connection $connection = null): trueext-posix
posix_getrlimitAdded 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):intto?int - Parameter default value changed for position #1 (
$seed):<default>tonull
- mt_srand(int $seed = <default>, int $mode = MT_RAND_MT19937): void + mt_srand(?int $seed = null, int $mode = MT_RAND_MT19937): voidsrand- Parameter type changed for parameter #1 (
$seed):intto?int - Parameter default value changed for position #1 (
$seed):<default>tonull
- srand(int $seed = <default>, int $mode = MT_RAND_MT19937): void + srand(?int $seed = null, int $mode = MT_RAND_MT19937): voidext-session
session_set_save_handler- Parameter type changed for parameter #7 (
$create_sid):callableto?callable - Parameter default value changed for position #7 (
$create_sid):<default>tonull - Parameter type changed for parameter #8 (
$validate_sid):callableto?callable - Parameter default value changed for position #8 (
$validate_sid):<default>tonull - Parameter type changed for parameter #9 (
$update_timestamp):callableto?callable - Parameter default value changed for position #9 (
$update_timestamp):<default>tonull
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 ): boolext-snmp
snmp_set_enum_printReturn type changed:
booltotrue- snmp_set_enum_print(bool $enable): bool + snmp_set_enum_print(bool $enable): truesnmp_set_oid_numeric_printReturn type changed:
booltotrue- snmp_set_oid_numeric_print(int $format): bool + snmp_set_oid_numeric_print(int $format): truesnmp_set_oid_output_formatReturn type changed:
booltotrue- snmp_set_oid_output_format(int $format): bool + snmp_set_oid_output_format(int $format): truesnmp_set_quick_printReturn type changed:
booltotrue- snmp_set_quick_print(bool $enable): bool + snmp_set_quick_print(bool $enable): truesnmp_set_valueretrievalReturn type changed:
booltotrue- snmp_set_valueretrieval(int $method): bool + snmp_set_valueretrieval(int $method): true
Core
natcasesortReturn type changed:
booltotrue- natcasesort(array &$array): bool + natcasesort(array &$array): truersortReturn type changed:
booltotrue- rsort(array &$array, int $flags = SORT_REGULAR): bool + rsort(array &$array, int $flags = SORT_REGULAR): truerange- 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 ): arraystrrchr- 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|falsenatsortReturn type changed:
booltotrue- natsort(array &$array): bool + natsort(array &$array): trueext-xml
xml_parser_get_optionReturn type changed:
string|inttostring|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_initParameter type changed for parameter #2 (
$options):arraytoobject|array- inflate_init(int $encoding, array $options = []): InflateContext|false + inflate_init(int $encoding, object|array $options = []): InflateContext|falsedeflate_initParameter type changed for parameter #2 (
$options):arraytoobject|array- deflate_init(int $encoding, array $options = []): DeflateContext|false + deflate_init(int $encoding, object|array $options = []): DeflateContext|false
Changed
Constants
pcre
PCRE_VERSION_MINORConstant value changed from
47to42
Subscribe to PHP.Watch newsletter for monthly updatesYou 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.
- Parameter type added for parameter #1 (
- Parameter type changed for parameter #7 (
- Parameter type changed for parameter #1 (
- Optional parameter added - #4:
- Parameter type changed for parameter #2 (
- Parameter default value changed for position #3 (