PHP 7.2 Codex Changelog
| Newly added | Improvements | Changed | Deprecations | Removals | |
|---|---|---|---|---|---|
| INI Directives | 1 | ‧ | 5 | ‧ | 4 |
| Extensions | 1 | ‧ | ‧ | ‧ | 1 |
| Constants | 154 | ‧ | 4 | ‧ | 39 |
| Functions | 113 | 6 | 2 | 5 | 32 |
| Classes | 2 | ‧ | 8 | ‧ | ‧ |
| Interfaces | ‧ | ‧ | 1 | ‧ | ‧ |
Newly added
INI Directives
Global
max_multipart_body_partsINI directive added
Extensions
Global
ext-sodiumExtension added
Constants
Core
PHP_OS_FAMILYConstant added
PHP_FLOAT_EPSILONConstant added
PHP_FLOAT_DIGConstant added
PHP_FLOAT_MAXConstant added
PHP_FLOAT_MINConstant added
fileinfo
FILEINFO_EXTENSIONConstant added
gd
IMG_EFFECT_MULTIPLYConstant added
IMG_BMPConstant added
json
JSON_INVALID_UTF8_IGNOREConstant added
JSON_INVALID_UTF8_SUBSTITUTEConstant added
ldap
LDAP_CONTROL_X_INCREMENTAL_VALUESConstant added
LDAP_CONTROL_X_DOMAIN_SCOPEConstant added
LDAP_CONTROL_X_PERMISSIVE_MODIFYConstant added
LDAP_CONTROL_X_SEARCH_OPTIONSConstant added
LDAP_CONTROL_ASSERTConstant added
LDAP_CONTROL_X_TREE_DELETEConstant added
LDAP_EXOP_MODIFY_PASSWDConstant added
LDAP_CONTROL_PAGEDRESULTSConstant added
LDAP_EXOP_START_TLSConstant added
LDAP_EXOP_TURNConstant added
LDAP_EXOP_WHO_AM_IConstant added
LDAP_CONTROL_MANAGEDSAITConstant added
LDAP_CONTROL_DONTUSECOPYConstant added
LDAP_CONTROL_SYNC_DONEConstant added
LDAP_CONTROL_PRE_READConstant added
LDAP_CONTROL_PROXY_AUTHZConstant added
LDAP_CONTROL_POST_READConstant added
LDAP_CONTROL_SORTREQUESTConstant added
LDAP_CONTROL_SORTRESPONSEConstant added
LDAP_CONTROL_SUBENTRIESConstant added
LDAP_CONTROL_SYNCConstant added
LDAP_CONTROL_PASSWORDPOLICYRESPONSEConstant added
LDAP_CONTROL_X_EXTENDED_DNConstant added
LDAP_CONTROL_SYNC_STATEConstant added
LDAP_CONTROL_VALUESRETURNFILTERConstant added
LDAP_CONTROL_PASSWORDPOLICYREQUESTConstant added
LDAP_CONTROL_VLVREQUESTConstant added
LDAP_CONTROL_AUTHZID_REQUESTConstant added
LDAP_CONTROL_VLVRESPONSEConstant added
LDAP_CONTROL_AUTHZID_RESPONSEConstant added
mysqli
MYSQLI_OPT_READ_TIMEOUTConstant added
pcntl
pcre
PREG_UNMATCHED_AS_NULLConstant added
sockets
AI_NUMERICHOSTConstant added
AI_ADDRCONFIGConstant added
AI_V4MAPPEDConstant added
AI_PASSIVEConstant added
AI_NUMERICSERVConstant added
AI_IDN_USE_STD3_ASCII_RULESConstant added
AI_IDN_ALLOW_UNASSIGNEDConstant added
AI_IDNConstant added
AI_CANONNAMEConstant added
AI_CANONIDNConstant added
AI_ALLConstant added
sodium
SODIUM_LIBRARY_VERSIONConstant added
SODIUM_CRYPTO_SECRETBOX_KEYBYTESConstant added
SODIUM_CRYPTO_SECRETBOX_MACBYTESConstant added
SODIUM_CRYPTO_SECRETBOX_NONCEBYTESConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTESConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTESConstant added
SODIUM_BASE64_VARIANT_URLSAFEConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGEConstant added
SODIUM_CRYPTO_SHORTHASH_BYTESConstant added
SODIUM_CRYPTO_SIGN_BYTESConstant added
SODIUM_CRYPTO_SIGN_KEYPAIRBYTESConstant added
SODIUM_CRYPTO_SIGN_PUBLICKEYBYTESConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEYConstant added
SODIUM_CRYPTO_SIGN_SECRETKEYBYTESConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSHConstant added
SODIUM_CRYPTO_SIGN_SEEDBYTESConstant added
SODIUM_CRYPTO_SHORTHASH_KEYBYTESConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINALConstant added
SODIUM_CRYPTO_STREAM_KEYBYTESConstant added
SODIUM_CRYPTO_STREAM_NONCEBYTESConstant added
SODIUM_LIBRARY_MAJOR_VERSIONConstant added
SODIUM_LIBRARY_MINOR_VERSIONConstant added
SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTESConstant added
SODIUM_CRYPTO_GENERICHASH_BYTES_MAXConstant added
SODIUM_CRYPTO_GENERICHASH_BYTESConstant added
SODIUM_CRYPTO_BOX_SEEDBYTESConstant added
SODIUM_CRYPTO_BOX_SECRETKEYBYTESConstant added
SODIUM_CRYPTO_BOX_SEALBYTESConstant added
SODIUM_CRYPTO_BOX_PUBLICKEYBYTESConstant added
SODIUM_CRYPTO_BOX_NONCEBYTESConstant added
SODIUM_CRYPTO_BOX_MACBYTESConstant added
SODIUM_CRYPTO_BOX_KEYPAIRBYTESConstant added
SODIUM_CRYPTO_AUTH_KEYBYTESConstant added
SODIUM_CRYPTO_AUTH_BYTESConstant added
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTESConstant added
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTESConstant added
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTESConstant added
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTESConstant added
SODIUM_CRYPTO_SCALARMULT_BYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTESConstant added
SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTESConstant added
SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTESConstant added
SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTESConstant added
SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTESConstant added
SODIUM_CRYPTO_AEAD_AES256GCM_ABYTESConstant added
SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDINGConstant added
SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDINGConstant added
SODIUM_BASE64_VARIANT_ORIGINALConstant added
SODIUM_CRYPTO_GENERICHASH_KEYBYTESConstant added
SODIUM_CRYPTO_SCALARMULT_SCALARBYTESConstant added
SODIUM_CRYPTO_PWHASH_STRPREFIXConstant added
SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIXConstant added
SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTESConstant added
SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVEConstant added
SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVEConstant added
SODIUM_CRYPTO_PWHASH_SALTBYTESConstant added
SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVEConstant added
SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATEConstant added
SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVEConstant added
SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVEConstant added
SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATEConstant added
SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVEConstant added
SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13Constant added
SODIUM_CRYPTO_GENERICHASH_BYTES_MINConstant added
SODIUM_CRYPTO_PWHASH_ALG_DEFAULTConstant added
SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAXConstant added
SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MINConstant added
SODIUM_CRYPTO_KDF_BYTES_MAXConstant added
SODIUM_CRYPTO_KDF_BYTES_MINConstant added
SODIUM_CRYPTO_KDF_CONTEXTBYTESConstant added
SODIUM_CRYPTO_KDF_KEYBYTESConstant added
SODIUM_CRYPTO_KX_KEYPAIRBYTESConstant added
SODIUM_CRYPTO_KX_PUBLICKEYBYTESConstant added
SODIUM_CRYPTO_KX_SECRETKEYBYTESConstant added
SODIUM_CRYPTO_KX_SEEDBYTESConstant added
SODIUM_CRYPTO_KX_SESSIONKEYBYTESConstant added
SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13Constant added
standard
PASSWORD_ARGON2_DEFAULT_MEMORY_COSTConstant added
PASSWORD_ARGON2_DEFAULT_THREADSConstant added
PASSWORD_ARGON2_DEFAULT_TIME_COSTConstant added
PASSWORD_ARGON2IConstant added
zlib
ZLIB_BUF_ERRORConstant added
ZLIB_DATA_ERRORConstant added
ZLIB_ERRNOConstant added
ZLIB_MEM_ERRORConstant added
ZLIB_NEED_DICTConstant added
ZLIB_OKConstant added
ZLIB_STREAM_ENDConstant added
ZLIB_STREAM_ERRORConstant added
ZLIB_VERSION_ERRORConstant added
Functions
ext-ftp
ftp_mlsdFunction added
ftp_appendFunction added
ext-gd
imageresolutionFunction added
imagesetclipFunction added
imageopenpolygonFunction added
imagegetclipFunction added
imagecreatefrombmpFunction added
imagebmpFunction added
imageantialiasFunction added
ext-hash
hash_hmac_algosFunction added
ext-ldap
ldap_parse_exopFunction added
ldap_exop_passwdFunction added
ldap_exopFunction added
ldap_exop_whoamiFunction added
ext-mbstring
ext-oci8
oci_set_call_timeoutFunction added
oci_set_db_operationFunction added
ext-openssl
openssl_pkcs7_readFunction added
ext-sockets
socket_addrinfo_bindFunction added
socket_addrinfo_connectFunction added
socket_addrinfo_explainFunction added
socket_addrinfo_lookupFunction added
ext-sodium
sodium_crypto_sign_verify_detachedFunction added
sodium_crypto_stream_xorFunction added
sodium_addFunction added
sodium_base642binFunction added
sodium_bin2base64Function added
sodium_bin2hexFunction added
sodium_memcmpFunction added
sodium_memzeroFunction added
sodium_crypto_aead_chacha20poly1305_encryptFunction added
sodium_crypto_aead_chacha20poly1305_decryptFunction added
sodium_padFunction added
sodium_unpadFunction added
sodium_crypto_aead_chacha20poly1305_ietf_decryptFunction added
sodium_crypto_aead_chacha20poly1305_ietf_encryptFunction added
sodium_compareFunction added
sodium_crypto_aead_aes256gcm_keygenFunction added
sodium_crypto_aead_chacha20poly1305_ietf_keygenFunction added
sodium_crypto_aead_aes256gcm_is_availableFunction added
sodium_crypto_aead_chacha20poly1305_keygenFunction added
sodium_incrementFunction added
sodium_hex2binFunction added
sodium_crypto_aead_aes256gcm_encryptFunction added
sodium_crypto_aead_aes256gcm_decryptFunction added
sodium_crypto_secretstream_xchacha20poly1305_pushFunction added
sodium_crypto_generichash_updateFunction added
sodium_crypto_sign_detachedFunction added
sodium_crypto_signFunction added
sodium_crypto_kdf_derive_from_keyFunction added
sodium_crypto_shorthash_keygenFunction added
sodium_crypto_kdf_keygenFunction added
sodium_crypto_kx_client_session_keysFunction added
sodium_crypto_kx_keypairFunction added
sodium_crypto_kx_publickeyFunction added
sodium_crypto_kx_secretkeyFunction added
sodium_crypto_shorthashFunction added
sodium_crypto_kx_seed_keypairFunction added
sodium_crypto_kx_server_session_keysFunction added
sodium_crypto_pwhashFunction added
sodium_crypto_secretstream_xchacha20poly1305_rekeyFunction added
sodium_crypto_generichash_keygenFunction added
sodium_crypto_secretstream_xchacha20poly1305_pullFunction added
sodium_crypto_secretstream_xchacha20poly1305_keygenFunction added
sodium_crypto_secretstream_xchacha20poly1305_init_pushFunction added
sodium_crypto_secretstream_xchacha20poly1305_init_pullFunction added
sodium_crypto_pwhash_scryptsalsa208sha256Function added
sodium_crypto_secretbox_openFunction added
sodium_crypto_pwhash_scryptsalsa208sha256_strFunction added
sodium_crypto_pwhash_scryptsalsa208sha256_str_verifyFunction added
sodium_crypto_secretbox_keygenFunction added
sodium_crypto_pwhash_strFunction added
sodium_crypto_pwhash_str_needs_rehashFunction added
sodium_crypto_pwhash_str_verifyFunction added
sodium_crypto_scalarmultFunction added
sodium_crypto_scalarmult_baseFunction added
sodium_crypto_sign_secretkeyFunction added
sodium_crypto_aead_xchacha20poly1305_ietf_encryptFunction added
sodium_crypto_aead_xchacha20poly1305_ietf_keygenFunction added
sodium_crypto_stream_keygenFunction added
sodium_crypto_authFunction added
sodium_crypto_streamFunction added
sodium_crypto_secretboxFunction added
sodium_crypto_auth_keygenFunction added
sodium_crypto_auth_verifyFunction added
sodium_crypto_boxFunction added
sodium_crypto_box_keypairFunction added
sodium_crypto_box_keypair_from_secretkey_and_publickeyFunction added
sodium_crypto_sign_seed_keypairFunction added
sodium_crypto_box_openFunction added
sodium_crypto_box_publickeyFunction added
sodium_crypto_box_publickey_from_secretkeyFunction added
sodium_crypto_aead_xchacha20poly1305_ietf_decryptFunction added
sodium_crypto_box_sealFunction added
sodium_crypto_box_seal_openFunction added
sodium_crypto_box_secretkeyFunction added
sodium_crypto_sign_publickey_from_secretkeyFunction added
sodium_crypto_box_seed_keypairFunction added
sodium_crypto_sign_publickeyFunction added
sodium_crypto_generichashFunction added
sodium_crypto_sign_openFunction added
sodium_crypto_sign_keypair_from_secretkey_and_publickeyFunction added
sodium_crypto_generichash_finalFunction added
sodium_crypto_generichash_initFunction added
sodium_crypto_sign_keypairFunction added
sodium_crypto_sign_ed25519_sk_to_curve25519Function added
sodium_crypto_sign_ed25519_pk_to_curve25519Function added
ext-SPL
spl_object_idFunction added
Core
stream_isattyFunction added
ext-zlib
inflate_get_read_lenFunction added
inflate_get_statusFunction added
Classes
ext-hash
HashContextClass added
ext-sodium
SodiumExceptionException class added
Removals
INI Directives
Global
sql.safe_modeINI directive removed
mcrypt.algorithms_dirINI directive removed
mcrypt.modes_dirINI directive removed
opcache.fast_shutdownINI directive removed
Extensions
Global
ext-mcryptExtension removed
Functions
ext-mcrypt
MCRYPT_DECRYPTFunction removed
mcrypt_get_iv_sizeFunction removed
mcrypt_get_cipher_nameFunction removed
mcrypt_list_algorithmsFunction removed
mcrypt_get_key_sizeFunction removed
mcrypt_get_block_sizeFunction removed
mcrypt_module_get_supported_key_sizesFunction removed
mcrypt_module_get_algo_key_sizeFunction removed
mcrypt_module_get_algo_block_sizeFunction removed
mcrypt_module_closeFunction removed
mcrypt_create_ivFunction removed
mcrypt_genericFunction removed
mcrypt_enc_get_algorithms_nameFunction removed
mcrypt_enc_get_block_sizeFunction removed
mcrypt_enc_get_iv_sizeFunction removed
mcrypt_enc_get_key_sizeFunction removed
mcrypt_enc_get_modes_nameFunction removed
mcrypt_enc_get_supported_key_sizesFunction removed
mcrypt_generic_initFunction removed
mcrypt_enc_is_block_algorithmFunction removed
mcrypt_enc_is_block_algorithm_modeFunction removed
mcrypt_list_modesFunction removed
mcrypt_generic_deinitFunction removed
mcrypt_enc_is_block_modeFunction removed
mcrypt_enc_self_testFunction removed
MCRYPT_ENCRYPTFunction removed
mcrypt_module_is_block_algorithm_modeFunction removed
mcrypt_module_is_block_modeFunction removed
mcrypt_module_openFunction removed
mcrypt_module_self_testFunction removed
mcrypt_module_is_block_algorithmFunction removed
mdecrypt_genericFunction removed
Constants
mcrypt
MCRYPT_SAFER128Constant removed
MCRYPT_MODE_OFBConstant removed
MCRYPT_MODE_STREAMConstant removed
MCRYPT_PANAMAConstant removed
MCRYPT_RANDConstant removed
MCRYPT_RC2Constant removed
MCRYPT_RC6Constant removed
MCRYPT_RIJNDAEL_128Constant removed
MCRYPT_RIJNDAEL_192Constant removed
MCRYPT_RIJNDAEL_256Constant removed
MCRYPT_DEV_URANDOMConstant removed
MCRYPT_SAFER64Constant removed
MCRYPT_SAFERPLUSConstant removed
MCRYPT_SERPENTConstant removed
MCRYPT_SKIPJACKConstant removed
MCRYPT_THREEWAYConstant removed
MCRYPT_TRIPLEDESConstant removed
MCRYPT_TWOFISHConstant removed
MCRYPT_WAKEConstant removed
MCRYPT_XTEAConstant removed
MCRYPT_MODE_ECBConstant removed
MCRYPT_ENIGNAConstant removed
MCRYPT_GOSTConstant removed
MCRYPT_DEV_RANDOMConstant removed
MCRYPT_DESConstant removed
MCRYPT_CRYPTConstant removed
MCRYPT_CAST_256Constant removed
MCRYPT_CAST_128Constant removed
MCRYPT_BLOWFISH_COMPATConstant removed
MCRYPT_BLOWFISHConstant removed
MCRYPT_ARCFOUR_IVConstant removed
MCRYPT_IDEAConstant removed
MCRYPT_ARCFOURConstant removed
MCRYPT_LOKI97Constant removed
MCRYPT_3DESConstant removed
MCRYPT_MARSConstant removed
MCRYPT_MODE_CBCConstant removed
MCRYPT_MODE_CFBConstant removed
MCRYPT_MODE_NOFBConstant removed
Changed
INI Directives
Global
mysqli.allow_local_infileINI directive default value changed from
1to0mysqlnd.net_read_timeoutINI directive default value changed from
31536000to86400track_errorsINI directive default value set to
0opcache.optimization_levelINI directive default value changed from
0x7FFFBFFFto0x7FFEBF5Fsession.cookie_secureINI directive default value set to
0
Interfaces
Core
Classes
ext-dom
DOMNamedNodeMapImplements
CountableinterfaceDOMNodeListImplements
Countableinterface
ext-PDO
PDOCloning class objects is no longer allowed
PDOStatementCloning class objects is no longer allowed
ext-SPL
GlobIteratorCloning class objects is no longer allowed
SplFileObjectCloning class objects is no longer allowed
SplTempFileObjectCloning class objects is no longer allowed
ext-zip
ZipArchiveImplements
Countableinterface
Functions
Core
Constants
mysqli
MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDSConstant value changed from
29to37MYSQLI_SERVER_PUBLIC_KEYConstant value changed from
27to35
standard
STREAM_CRYPTO_METHOD_TLS_SERVERConstant value changed from
8to56STREAM_CRYPTO_METHOD_TLS_CLIENTConstant value changed from
9to57
Improvements
Functions
ext-bcmath
bcmod- Optional parameter added - #3:
$scale
-bcmod($left_operand, $right_operand) +bcmod( + $left_operand, + $right_operand, + $scale + )ext-date
date_create_from_formatParameter type added for parameter #3 (
$object):DateTimeZone or NULLdate_create_from_format( $format, $time, - $object + DateTimeZone or NULL $object )date_create_immutable_from_formatParameter type added for parameter #3 (
$object):DateTimeZone or NULLdate_create_immutable_from_format( $format, $time, - $object + DateTimeZone or NULL $object )
ext-mbstring
mb_decode_numericentity- Optional parameter added - #4:
$is_hex
mb_decode_numericentity( $string, $convmap, - $encoding + $encoding, + $is_hex )ext-mysqli
mysqli_get_client_infoNo longer accepts any parameters
- mysqli_get_client_info($link) + mysqli_get_client_info()
ext-openssl
openssl_pkcs7_verify- Optional parameter added - #7:
$pk7
openssl_pkcs7_verify( $filename, $flags, $signerscerts, $cainfo, $extracerts, - $content + $content, + $pk7 )Deprecations
Functions
Core
create_functionFunction deprecated
ext-exif
read_exif_dataFunction deprecated
ext-gd
ext-gmp
gmp_randomFunction deprecated
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.
- Optional parameter added - #7:
- Optional parameter added - #4:
- Optional parameter added - #3: