@@ -19,14 +19,6 @@ PHP 8.4 UPGRADE NOTES
19
19
1. Backward Incompatible Changes
20
20
========================================
21
21
22
- - CLI:
23
- . The builtin server looks for an index file recursively by traversing parent
24
- directories in case the specified file cannot be located. This process was
25
- previously skipped if the path looked like it was referring to a file, i.e.
26
- if the last path component contained a period. In that case, a 404 error was
27
- returned. The behavior has been changed to look for an index file in all
28
- cases.
29
-
30
22
- Core:
31
23
. The type of PHP_DEBUG and PHP_ZTS constants changed to bool.
32
24
. The name of uploaded files and files created by the tempnam() function are
@@ -57,10 +49,6 @@ PHP 8.4 UPGRADE NOTES
57
49
should be replaced with checks for `false`.
58
50
59
51
- DOM:
60
- . Added DOMNode::compareDocumentPosition() and DOMNode::DOCUMENT_POSITION_*
61
- constants.
62
- If you have a method or constant with the same name, you might encounter errors
63
- if the declaration is incompatible.
64
52
. Some DOM methods previously returned false or a PHP_ERR DOMException if a new
65
53
node could not be allocated. They consistently throw an INVALID_STATE_ERR
66
54
DOMException now. This situation is extremely unlikely though and probably
@@ -69,18 +57,12 @@ PHP 8.4 UPGRADE NOTES
69
57
. Previously, DOMXPath objects could be cloned, but resulted in an unusable
70
58
object. This is no longer possible, and cloning a DOMXPath object now throws
71
59
an error.
72
- . DOMDocument::$actualEncoding, DOMDocument::config, DOMEntity::$actualEncoding,
73
- DOMEntity::$encoding, DOMEntity::$version have been deprecated.
74
- RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties
75
60
. Removed DOMImplementation::getFeature().
76
61
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_domimplementationgetfeature_feature_version
77
62
78
63
- GMP:
79
64
. The GMP class is now final and cannot be extended anymore.
80
65
RFC: https://wiki.php.net/rfc/gmp-final
81
- . Casting a GMP object to bool changed so that 0 becomes false and everything else
82
- becomes true.
83
- RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class
84
66
85
67
- Intl:
86
68
. resourcebundle_get(), ResourceBundle::get(), and accessing offsets on a
@@ -190,18 +172,6 @@ PHP 8.4 UPGRADE NOTES
190
172
constructor counterparts, being closer to the documentation states.
191
173
192
174
- Reflection:
193
- . Added methods ReflectionClass::newLazyGhost(),
194
- ReflectionClass::newLazyProxy(), ReflectionClass::resetAsLazyGhost(),
195
- ReflectionClass::resetAsLazyProxy(),
196
- ReflectionClass::isUninitializedLazyObject(),
197
- ReflectionClass::initializeLazyObject(),
198
- ReflectionClass::markLazyObjectAsInitialized(),
199
- ReflectionClass::getLazyInitializer(),
200
- ReflectionProperty::skipLazyInitialization(),
201
- ReflectionProperty::setRawValueWithoutLazyInitialization() and constants
202
- ReflectionClass::SKIP_*.
203
- If you have a method or constant with the same name, you might encounter
204
- errors if the declaration is incompatible.
205
175
. The class constants are typed now.
206
176
207
177
- SimpleXML:
@@ -230,10 +200,6 @@ PHP 8.4 UPGRADE NOTES
230
200
To solve this, either don't use rtld-now or load the session extension.
231
201
232
202
- SPL:
233
- . Out of bounds accesses in SplFixedArray now throw an exception of type
234
- OutOfBoundsException instead of RuntimeException. As OutOfBoundsException
235
- is a child class of RuntimeException, code that uses RuntimeException
236
- continues to function.
237
203
. The class constants are typed now.
238
204
239
205
- Sqlite:
@@ -347,6 +313,7 @@ PHP 8.4 UPGRADE NOTES
347
313
curl_getinfo() $option parameter. This requires libcurl 8.10.0 or later.
348
314
349
315
- DOM:
316
+ . Added DOMNode::compareDocumentPosition()
350
317
. Added constant DOMNode::DOCUMENT_POSITION_DISCONNECTED.
351
318
. Added constant DOMNode::DOCUMENT_POSITION_PRECEDING.
352
319
. Added constant DOMNode::DOCUMENT_POSITION_FOLLOWING.
@@ -481,6 +448,14 @@ PHP 8.4 UPGRADE NOTES
481
448
. Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache
482
449
version is now 2.4.
483
450
451
+ - CLI:
452
+ . The builtin server looks for an index file recursively by traversing parent
453
+ directories in case the specified file cannot be located. This process was
454
+ previously skipped if the path looked like it was referring to a file, i.e.
455
+ if the last path component contained a period. In that case, a 404 error was
456
+ returned. The behavior has been changed to look for an index file in all
457
+ cases.
458
+
484
459
- FPM:
485
460
. /dev/poll events.mechanism setting for Solaris/Illumos had been retired.
486
461
@@ -495,6 +470,11 @@ PHP 8.4 UPGRADE NOTES
495
470
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
496
471
. Using "_" as a class name is now deprecated.
497
472
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name
473
+ . Raising zero to the power of negative number is deprecated.
474
+ RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number
475
+ . The E_STRICT constant was deprecated and its corresponding error level was
476
+ removed.
477
+ RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
498
478
499
479
- Curl:
500
480
. The CURLOPT_BINARYTRANSFER constant is deprecated.
@@ -514,6 +494,9 @@ PHP 8.4 UPGRADE NOTES
514
494
- DOM:
515
495
. Deprecated DOM_PHP_ERR constant.
516
496
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant
497
+ . DOMDocument::$actualEncoding, DOMDocument::config, DOMEntity::$actualEncoding,
498
+ DOMEntity::$encoding, DOMEntity::$version have been deprecated.
499
+ RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties
517
500
518
501
- Hash:
519
502
. Deprecated passing incorrect data types for options to ext/hash functions.
@@ -605,8 +588,6 @@ PHP 8.4 UPGRADE NOTES
605
588
- Standard:
606
589
. Calling stream_context_set_option() with 2 arguments is deprecated.
607
590
Use stream_context_set_options() instead.
608
- . Raising zero to the power of negative number is deprecated.
609
- RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number
610
591
. Unserializing strings using the uppercase 'S' tag is deprecated.
611
592
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#unserialize_s_s_tag
612
593
. Using the default value for $escape parameter of:
@@ -787,6 +768,9 @@ PHP 8.4 UPGRADE NOTES
787
768
6. New Functions
788
769
========================================
789
770
771
+ - Core:
772
+ . request_parse_body()
773
+
790
774
- BCMath:
791
775
. Added bcfloor(), bcceil(), bcround().
792
776
RFC: https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_bcmath
@@ -806,7 +790,6 @@ PHP 8.4 UPGRADE NOTES
806
790
RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl
807
791
. Added DOMXPath::quote() to quote a string for use in an XPath expression.
808
792
Example usage: "//span[contains(text()," . $xpath->quote($string) . ")]"
809
- . DOMNode::compareDocumentPosition()
810
793
811
794
- Hash:
812
795
. Added HashContext::__debugInfo().
@@ -1021,6 +1004,11 @@ PHP 8.4 UPGRADE NOTES
1021
1004
effect, and is silently ignored. This underlying feature was
1022
1005
deprecated in libcurl 7.11.1 and removed in 7.62.0.
1023
1006
1007
+ - GMP:
1008
+ . Casting a GMP object to bool changed so that 0 becomes false and everything else
1009
+ becomes true.
1010
+ RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class
1011
+
1024
1012
- Intl:
1025
1013
. The behaviour of Intl class has been normalized to always throw Error
1026
1014
exceptions when attempting to use a non-initialized object,
@@ -1044,6 +1032,12 @@ PHP 8.4 UPGRADE NOTES
1044
1032
- PgSQL:
1045
1033
. The pgsql extension now requires at least libpq 10.0.
1046
1034
1035
+ - SPL:
1036
+ . Out of bounds accesses in SplFixedArray now throw an exception of type
1037
+ OutOfBoundsException instead of RuntimeException. As OutOfBoundsException
1038
+ is a child class of RuntimeException, code that uses RuntimeException
1039
+ continues to function.
1040
+
1047
1041
- XSL:
1048
1042
. The typed properties XSLTProcessor::$cloneDocument and
1049
1043
XSLTProcessor::$doXInclude are now declared.
0 commit comments