rfc:reflectiontypeimprovements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:reflectiontypeimprovements [2016/06/15 15:20] – levim | rfc:reflectiontypeimprovements [2020/08/01 23:51] (current) – Status is "Declined" carusogabriel | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Your Title Here ====== | + | ====== PHP RFC: ReflectionType Improvements |
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2016-06-10 | * Date: 2016-06-10 | ||
* Author: Levi Morrison < | * Author: Levi Morrison < | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | For PHP 7.0 the '' | + | For PHP 7.0 the '' |
===== Proposal ===== | ===== Proposal ===== | ||
- | This RFC adds several | + | This RFC adds two new subtypes for '' |
- | + | ||
- | * ReflectionType (already exists) | + | |
- | * ReflectionSingularType | + | |
- | * ReflectionIntType | + | |
- | * ReflectionFloatType | + | |
- | * ReflectionBoolType | + | |
- | * ReflectionStringType | + | |
- | * ReflectionArrayType | + | |
- | * ReflectionCallableType | + | |
- | * ReflectionVoidType | + | |
- | * ReflectionClassType | + | |
- | + | ||
- | '' | + | |
<PHP> | <PHP> | ||
- | class ReflectionSingularType | + | class ReflectionNamedType |
public function getName(): string; | public function getName(): string; | ||
} | } | ||
- | </ | ||
- | A call to the '' | ||
- | '' | + | class ReflectionClassType extends |
- | + | ||
- | < | + | |
- | class ReflectionClassType extends | + | |
public function getClass(): ReflectionClass; | public function getClass(): ReflectionClass; | ||
} | } | ||
</ | </ | ||
- | The engine will return a subtype of '' | + | If the engine does not recognize a type it will call the autoloader; if the class is found then a '' |
+ | |||
+ | A call to the '' | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 57: | Line 41: | ||
It is unclear if voting requires 50%+1 or 2/3. On one hand this is not a language change but on the other this does contain a BC break. Rather than debating it one way or the other I've chosen to require 2/3. | It is unclear if voting requires 50%+1 or 2/3. On one hand this is not a language change but on the other this does contain a BC break. Rather than debating it one way or the other I've chosen to require 2/3. | ||
- | The vote will be a simple yes or no for these changes. | + | The vote is a simple yes or no for these changes. |
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
The patch for this is not difficult; it will be coming soon. | The patch for this is not difficult; it will be coming soon. | ||
rfc/reflectiontypeimprovements.1466004050.txt.gz · Last modified: 2017/09/22 13:28 (external edit)