com php-src: Improve UPGRADING note: UPGRADING
| From: | Nikita Popov | Date: | Mon, 11 Feb 2019 08:54:08 +0000 |
| Subject: | com php-src: Improve UPGRADING note: UPGRADING | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104533@lists.php.net to get a copy of this message | ||
Commit: ab48b45f6c91e1a1bddf2c775a669ef1a294faf1
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 11 Feb 2019 09:54:08 +0100
Parents: 3570cbdfd3af57e592275defc0708bb226b26716
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ab48b45f6c91e1a1bddf2c775a669ef1a294faf1
Log:
Improve UPGRADING note
[ci skip]
Changed paths:
M UPGRADING
Diff:
diff --git a/UPGRADING b/UPGRADING
index 2942c64..850f3fc 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -106,14 +106,24 @@ PHP 8.0 UPGRADE NOTES
restored with an explicit call to chr().
- Reflection:
- . The following methods signatures have been changed:
+ . The method signatures
- * ReflectionClass::newInstance(mixed $args) ->
ReflectionClass::newInstance([mixed ...$args])
- * ReflectionFunction::invoke(mixed $args) -> ReflectionFunction::invoke(mixed
...$args)
- * ReflectionMethod::invoke(object $object, mixed $args) -> ReflectionMethod::invoke(object
$object [, mixed ...$args])
+ ReflectionClass::newInstance($args)
+ ReflectionFunction::invoke($args)
+ ReflectionMethod::invoke($object, $args)
- Inheriting classes implementing this method will now have to use
- a compatible method signature.
+ have been changed to:
+
+ ReflectionClass::newInstance(...$args)
+ ReflectionFunction::invoke(...$args)
+ ReflectionMethod::invoke($object, ...$args)
+
+ Code that must be compatible with both PHP 7 and PHP 8 can use the following
+ signatures to be compatible with both versions:
+
+ ReflectionClass::newInstance($arg = null, ...$args)
+ ReflectionFunction::invoke($arg = null, ....$args)
+ ReflectionMethod::invoke($object, $arg = null, ...$args)
- SPL:
. SplFileObject::fgetss() has been removed.