PHP 8.2.x 기타 변경 사항
Core changes
iterable 유형은 이제 array|Traversable에 대한 내장 컴파일 시간 별칭입니다. 따라서 iterable
과 관련된 오류 메시지는 이제 array|Traversable
을 사용합니다. 단일 iterable
(및 ?iterable
)이 iterable
이라는 이름의 ReflectionNamedType을 생성하기 위해 Type Reflection이 유지되지만, 공용체 유형에서 iterable
을 사용하면 array|Traversable
로 변환됩니다.
Changes in SAPI Modules
CLI
STDOUT, STDERR 및 STDIN 스트림은 리소스 파괴 시 더 이상 닫히지 않으며 대부분 CLI가 완료될 때입니다. 그러나 fclose() 등을 사용하여 이러한 스트림을 명시적으로 닫는 것은 여전히 가능합니다.
변경된 함수
Core
이진 안전 문자열 비교를 사용하는 strcmp(), strcasecmp(),strncmp(), strncasecmp() 및 substr_compare() 함수는 이제 -1
, 0
및 1
을 반환합니다.
DBA
이제 dba_open() 및 dba_popen()에 다음과 같은 강제 서명이 있습니다.
dba_open( string $path, string $mode, ?string $handler = null, int $permission = 0644, int $map_size = 0, ?int $flags = null ): resource|false
dba_fetch()의 선택적 건너뛰기 인수는 이제 PHP 사용자 영역 의미 체계의 끝에 있습니다. 서명은 다음과 같습니다.
dba_fetch(string|array $key
, resource $handle
, int $skip
): string|false
여전히 허용되지만 새로운 표준 변형을 사용하는 것이 좋습니다.
Random
random_bytes() 및 random_int()는 이제 CSPRNG 실패 시 \Random\RandomException을 발생시킵니다. 이전에는 일반 \Exception이 대신 throw되었습니다.
SPL
iterator_to_array() 및 iterator_count()의 iterator
매개변수는 Iterator에서 iterable로 확장되어 배열을 전달할 수 있습니다.
확장에 대한 기타 변경 사항
Date
이제 DatePeriod의 속성이 올바르게 선언됩니다.
Intl
IntlBreakIterator,IntlRuleBasedBreakIterator,IntlCodePointBreakIterator,IntlPartsIterator,IntlCalendar,IntlCalendar,Collator,IntlIterator,UConverter,IntlDateFormatter,IntlDatePatternGenerator,MessageFormatter,ResourceBundle,Spoofchecker,IntlTimeZone 및 Transliterator는 더 이상 직렬화할 수 없습니다. 이전에는 직렬화할 수 있었지만 직렬화 해제로 인해 사용할 수 없는 개체가 생성되거나 실패했습니다.
MySQLi
libmysql에 대한 지원이 제거되었으며 더 이상 libmysql로 mysqli를 컴파일할 수 없습니다. 이제부터 mysqli 확장은 mysqlnd로만 컴파일할 수 있습니다. mysqlnd에서 사용할 수 없는 모든 libmysql 기능이 제거되었습니다.
- mysqli_driver의 재연결 속성
- mysqli.reconnect INI 지시문
-
MYSQLI_IS_MARIADB
상수는 더 이상 사용되지 않습니다.
OCI8
필요한 최소 Oracle 클라이언트 라이브러리 버전은 이제 11.2입니다.
PCRE
이제 패턴 문자열의 NUL 문자(\0
)가 지원됩니다.
Session
세션이 활성 상태이거나 출력이 이미 전송된 동안 session.cookie_samesite INI 지시문을 변경하려고 하면 이제 실패하고 경고가 발생합니다. 이렇게 하면 동작이 다른 모든 세션 INI 설정과 일치합니다.
SQLite3
sqlite3.defensive는 이제 PHP_INI_USER
입니다.
Standard
getimagesize()는 이제 AVIF 이미지의 실제 이미지 크기, 비트 및 채널을 보고합니다. 이전에는 차원이 0x0으로 보고되었으며 비트와 채널은 전혀 보고되지 않았습니다.
Tidy
tidy 클래스의 속성이 이제 제대로 선언되었습니다. 그리고 tityNode 클래스의 클래스는 이제 읽기 전용으로 올바르게 선언됩니다.
Zip
Zip 확장이 버전 1.20.0으로 업데이트되어 다음 메서드가 추가되었습니다.
INI 파일 처리 변경 사항
형식이 잘못된 값을 구문 분석하면 이전에 자동으로 무시되었을 때 경고가 트리거됩니다. 이전 버전과의 호환성을 위해 이러한 값의 해석은 변경되지 않았습니다. 이는 다음 설정에 영향을 줍니다.
- bcmath.scale
- com.code_page
- default_socket_timeout
- fiber.stack_size
- hard_timeout
- intl.error_level
- ldap.max_links
- max_input_nesting_level
- max_input_vars
- mbstring.regex_retry_limit
- mbstring.regex_stack_limit
- mysqli.allow_local_infile
- mysqli.allow_persistent
- mysqli.default_port
- mysqli.max_links
- mysqli.max_persistent
- mysqli.rollback_on_cached_plink
- mysqlnd.log_mask
- mysqlnd.mempool_default_size
- mysqlnd.net_read_buffer_size
- mysqlnd.net_read_timeout
- oci8.default_prefetch
- oci8.max_persistent
- oci8.persistent_timeout
- oci8.ping_interval
- oci8.prefetch_lob_size
- oci8.privileged_connect
- oci8.statement_cache_size
- odbc.allow_persistent
- odbc.check_persistent
- odbc.max_persistent
- odbc.max_links
- odbc.defaultbinmode
- odbc.default_cursortype
- odbc.defaultlrl
- opcache.consistency_checks
- opcache.file_update_protection
- opcache.force_restart_timeout
- opcache.interned_strings_buffer
- opcache.jit_bisect_limit
- opcache.jit_blacklist_root_trace
- opcache.jit_blacklist_side_trace
- opcache.jit_debug
- opcache.jit_hot_func
- opcache.jit_hot_loop
- opcache.jit_hot_return
- opcache.jit_hot_side_exit
- opcache.jit_max_exit_counters
- opcache.jit_max_loop_unrolls
- opcache.jit_max_polymorphic_calls
- opcache.jit_max_recursive_calls
- opcache.jit_max_recursive_returns
- opcache.jit_max_root_traces
- opcache.jit_max_side_traces
- opcache.log_verbosity_level
- opcache.max_file_size
- opcache.opt_debug_level
- opcache.optimization_level
- opcache.revalidate_freq
- output_buffering
- pcre.backtrack_limit
- pcre.recursion_limit
- pgsql.max_links
- pgsql.max_persistent
- post_max_size
- realpath_cache_size
- realpath_cache_ttl
- session.cache_expire
- session.cookie_lifetime
- session.gc_divisor
- session.gc_maxlifetime
- session.gc_probability
- soap.wsdl_cache_limit
- soap.wsdl_cache_ttl
- unserialize_max_depth
- upload_max_filesize
- user_ini.cache_ttl
- xmlrpc_error_number
- zend.assertions
- zlib.output_compression_level