@@ -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
@@ -193,18 +175,6 @@ PHP 8.4 UPGRADE NOTES
193
175
constructor counterparts, being closer to the documentation states.
194
176
195
177
- Reflection:
196
- . Added methods ReflectionClass::newLazyGhost(),
197
- ReflectionClass::newLazyProxy(), ReflectionClass::resetAsLazyGhost(),
198
- ReflectionClass::resetAsLazyProxy(),
199
- ReflectionClass::isUninitializedLazyObject(),
200
- ReflectionClass::initializeLazyObject(),
201
- ReflectionClass::markLazyObjectAsInitialized(),
202
- ReflectionClass::getLazyInitializer(),
203
- ReflectionProperty::skipLazyInitialization(),
204
- ReflectionProperty::setRawValueWithoutLazyInitialization() and constants
205
- ReflectionClass::SKIP_*.
206
- If you have a method or constant with the same name, you might encounter
207
- errors if the declaration is incompatible.
208
178
. The class constants are typed now.
209
179
210
180
- SimpleXML:
@@ -233,10 +203,6 @@ PHP 8.4 UPGRADE NOTES
233
203
To solve this, either don't use rtld-now or load the session extension.
234
204
235
205
- SPL:
236
- . Out of bounds accesses in SplFixedArray now throw an exception of type
237
- OutOfBoundsException instead of RuntimeException. As OutOfBoundsException
238
- is a child class of RuntimeException, code that uses RuntimeException
239
- continues to function.
240
206
. The class constants are typed now.
241
207
242
208
- Sqlite:
@@ -350,6 +316,7 @@ PHP 8.4 UPGRADE NOTES
350
316
curl_getinfo() $option parameter. This requires libcurl 8.10.0 or later.
351
317
352
318
- DOM:
319
+ . Added DOMNode::compareDocumentPosition()
353
320
. Added constant DOMNode::DOCUMENT_POSITION_DISCONNECTED.
354
321
. Added constant DOMNode::DOCUMENT_POSITION_PRECEDING.
355
322
. Added constant DOMNode::DOCUMENT_POSITION_FOLLOWING.
@@ -484,6 +451,14 @@ PHP 8.4 UPGRADE NOTES
484
451
. Support for EOL Apache 2.0 and 2.2 has been removed. Minimum required Apache
485
452
version is now 2.4.
486
453
454
+ - CLI:
455
+ . The builtin server looks for an index file recursively by traversing parent
456
+ directories in case the specified file cannot be located. This process was
457
+ previously skipped if the path looked like it was referring to a file, i.e.
458
+ if the last path component contained a period. In that case, a 404 error was
459
+ returned. The behavior has been changed to look for an index file in all
460
+ cases.
461
+
487
462
- FPM:
488
463
. /dev/poll events.mechanism setting for Solaris/Illumos had been retired.
489
464
@@ -498,6 +473,11 @@ PHP 8.4 UPGRADE NOTES
498
473
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
499
474
. Using "_" as a class name is now deprecated.
500
475
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name
476
+ . Raising zero to the power of negative number is deprecated.
477
+ RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number
478
+ . The E_STRICT constant was deprecated and its corresponding error level was
479
+ removed.
480
+ RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
501
481
502
482
- Curl:
503
483
. The CURLOPT_BINARYTRANSFER constant is deprecated.
@@ -517,6 +497,9 @@ PHP 8.4 UPGRADE NOTES
517
497
- DOM:
518
498
. Deprecated DOM_PHP_ERR constant.
519
499
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_dom_php_err_constant
500
+ . DOMDocument::$actualEncoding, DOMDocument::config, DOMEntity::$actualEncoding,
501
+ DOMEntity::$encoding, DOMEntity::$version have been deprecated.
502
+ RFC: https://wiki.php.net/rfc/deprecations_php_8_4#formally_deprecate_soft-deprecated_domdocument_and_domentity_properties
520
503
521
504
- Hash:
522
505
. Deprecated passing incorrect data types for options to ext/hash functions.
@@ -608,8 +591,6 @@ PHP 8.4 UPGRADE NOTES
608
591
- Standard:
609
592
. Calling stream_context_set_option() with 2 arguments is deprecated.
610
593
Use stream_context_set_options() instead.
611
- . Raising zero to the power of negative number is deprecated.
612
- RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number
613
594
. Unserializing strings using the uppercase 'S' tag is deprecated.
614
595
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#unserialize_s_s_tag
615
596
. Using the default value for $escape parameter of:
@@ -790,6 +771,9 @@ PHP 8.4 UPGRADE NOTES
790
771
6. New Functions
791
772
========================================
792
773
774
+ - Core:
775
+ . request_parse_body()
776
+
793
777
- BCMath:
794
778
. Added bcfloor(), bcceil(), bcround().
795
779
RFC: https://wiki.php.net/rfc/adding_bcround_bcfloor_bcceil_to_bcmath
@@ -809,7 +793,6 @@ PHP 8.4 UPGRADE NOTES
809
793
RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl
810
794
. Added DOMXPath::quote() to quote a string for use in an XPath expression.
811
795
Example usage: "//span[contains(text()," . $xpath->quote($string) . ")]"
812
- . DOMNode::compareDocumentPosition()
813
796
814
797
- Hash:
815
798
. Added HashContext::__debugInfo().
@@ -1024,6 +1007,12 @@ PHP 8.4 UPGRADE NOTES
1024
1007
effect, and is silently ignored. This underlying feature was
1025
1008
deprecated in libcurl 7.11.1 and removed in 7.62.0.
1026
1009
1010
+ - GMP:
1011
+ . Casting a GMP object to bool is now possible instead of emitting a
1012
+ E_RECOVERABLE_ERROR. The casting behaviour is overloaded such that a GMP
1013
+ object representing the value 0 is cast to false.
1014
+ RFC: https://wiki.php.net/rfc/fix_up_bcmath_number_class
1015
+
1027
1016
- Intl:
1028
1017
. The behaviour of Intl class has been normalized to always throw Error
1029
1018
exceptions when attempting to use a non-initialized object,
@@ -1047,6 +1036,12 @@ PHP 8.4 UPGRADE NOTES
1047
1036
- PgSQL:
1048
1037
. The pgsql extension now requires at least libpq 10.0.
1049
1038
1039
+ - SPL:
1040
+ . Out of bounds accesses in SplFixedArray now throw an exception of type
1041
+ OutOfBoundsException instead of RuntimeException. As OutOfBoundsException
1042
+ is a child class of RuntimeException, code that uses RuntimeException
1043
+ continues to function.
1044
+
1050
1045
- XSL:
1051
1046
. The typed properties XSLTProcessor::$cloneDocument and
1052
1047
XSLTProcessor::$doXInclude are now declared.
0 commit comments