Skip to main content

PHP 8.3 Released!

DrupalVIP Support
Released!

 

PHP 8.3 is a major update of the PHP language.
It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvements, bug fixes, and general cleanup.

 

New Classes, Interfaces, and Functions

  • New DOMElement::getAttributeNames(), DOMElement::insertAdjacentElement(), DOMElement::insertAdjacentText(), DOMElement::toggleAttribute(), DOMNode::contains(), DOMNode::getRootNode(), DOMNode::isEqualNode(), DOMNameSpaceNode::contains(), and DOMParentNode::replaceChildren() methods.
  • New IntlCalendar::setDate(), IntlCalendar::setDateTime(), IntlGregorianCalendar::createFromDate(), and IntlGregorianCalendar::createFromDateTime() methods.
  • New ldap_connect_wallet(), and ldap_exop_sync() functions.
  • New mb_str_pad() function.
  • New posix_sysconf(), posix_pathconf(), posix_fpathconf(), and posix_eaccess() functions.
  • New ReflectionMethod::createFromMethodName() method.
  • New socket_atmark() function.
  • New str_increment(), str_decrement(), and stream_context_set_options() functions.
  • New ZipArchive::getArchiveFlag() method.
  • Support for generation EC keys with custom EC parameters in OpenSSL extension.
  • New INI setting zend.max_allowed_stack_size to set the maximum allowed stack size.
  • php.ini now supports fallback/default value syntax.
  • Anonymous classes can now be readonly.

 

Deprecations and backward compatibility breaks 

  • More Appropriate Date/Time Exceptions.
  • Assigning a negative index n to an empty array will now make sure that the next index is n + 1 instead of 0.
  • Changes to the range() function.
  • Changes in re-declaration of static properties in traits.
  • The U_MULTIPLE_DECIMAL_SEPERATORS constant is deprecated in favor of U_MULTIPLE_DECIMAL_SEPARATORS.
  • The MT_RAND_PHP Mt19937 variant is deprecated.
  • ReflectionClass::getStaticProperties() is no longer nullable.
  • INI settings assert.active, assert.bail, assert.callback, assert.exception, and assert.warning have been deprecated.
  • Calling get_class() and get_parent_class() without arguments are deprecated.
  • SQLite3: Default error mode set to exceptions.

 

Better performance, better syntax, improved type safety.