Other Changes
Changes in SAPI Modules
Apache2Handler
The PHP module has been renamed from php7_module
to
php_module
.
Changed Functions
Reflection
ReflectionClass::getConstants() and
ReflectionClass::getReflectionConstants() results can be now filtered via
a new parameter filter
. Three new constants were added to be used with it:
ReflectionClassConstant::IS_PUBLIC
ReflectionClassConstant::IS_PROTECTED
ReflectionClassConstant::IS_PRIVATE
Standard
The math functions abs(), ceil(),
floor() and round() now properly heed
the strict_types
directive.
Previously, they coerced the first argument even in strict type mode.
Zip
-
The ZipArchive::addGlob() and ZipArchive::addPattern() methods accept more values in the
options
array argument:flags
comp_method
comp_flags
env_method
enc_password
-
ZipArchive::addEmptyDir(), ZipArchive::addFile() and ZipArchive::addFromString() methods have a new
flags
argument. This allows managing name encoding (ZipArchive::FL_ENC_*
) and entry replacement (ZipArchive::FL_OVERWRITE
). -
ZipArchive::extractTo() now restores the file modification time.
Other Changes to Extensions
CURL
-
The CURL extension now requires at least libcurl 7.29.0.
-
The deprecated parameter
version
of curl_version() has been removed.
Date and Time
DatePeriod now implements IteratorAggregate (instead of Traversable).
DOM
DOMNamedNodeMap and DOMNodeList now implement IteratorAggregate (instead of Traversable).
Intl
IntlBreakIterator and ResourceBundle now implement IteratorAggregate (instead of Traversable).
Enchant
The enchant extension now uses libenchant-2 by default when available. libenchant version 1 is still supported but is deprecated and could be removed in the future.
GD
-
The
num_points
parameter of imagepolygon(), imageopenpolygon() and imagefilledpolygon() is now optional, i.e. these functions may be called with either 3 or 4 arguments. If the argument is omitted, it is calculated ascount($points)/2
. -
The function imagegetinterpolation() to get the current interpolation method has been added.
JSON
The JSON extension cannot be disabled anymore and is always an integral part of any PHP build, similar to the date extension.
MBString
The Unicode data tables have been updated to version 13.0.0.
PDO
PDOStatement now implements IteratorAggregate (instead of Traversable).
LibXML
The minimum required libxml version is now 2.9.0. This means that external entity loading is now guaranteed to be disabled by default, and no extra steps need to be taken to protect against XXE attacks.
MySQLi / PDO MySQL
-
When mysqlnd is not used (which is the default and recommended option), the minimum supported libmysqlclient version is now 5.5.
-
mysqli_result now implements IteratorAggregate (instead of Traversable).
PGSQL / PDO PGSQL
The PGSQL and PDO PGSQL extensions now require at least libpq 9.1.
Readline
Calling readline_completion_function() before the interactive prompt starts (e.g. in auto_prepend_file) will now override the default interactive prompt completion function. Previously, readline_completion_function() only worked when called after starting the interactive prompt.
SimpleXML
SimpleXMLElement now implements RecursiveIterator and absorbed the functionality of SimpleXMLIterator. SimpleXMLIterator is an empty extension of SimpleXMLElement.
Changes to INI File Handling
-
com.dotnet_version is a new INI directive to choose the version of the .NET framework to use for dotnet objects.
-
zend.exception_string_param_max_len is a new INI directive to set the maximum string length in an argument of a stringified stack strace.
EBCDIC
EBCDIC targets are no longer supported, though it's unlikely that they were still working in the first place.
Performance
-
A Just-In-Time (JIT) compiler has been added to the opcache extension.
-
array_slice() on an array without gaps will no longer scan the whole array to find the start offset. This may significantly reduce the runtime of the function with large offsets and small lengths.
-
strtolower() now uses a SIMD implementation when using the
"C"
LC_CTYPE
locale (which is the default).