rfc:instanceof_improvements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:instanceof_improvements [2021/03/08 16:04] – ++ maxsem | rfc:instanceof_improvements [2021/03/08 17:40] – maxsem | ||
---|---|---|---|
Line 20: | Line 20: | ||
Make '' | Make '' | ||
<code php> | <code php> | ||
- | var_dump(' | + | var_dump(' |
- | var_dump(' | + | var_dump(' |
$type = ' | $type = ' | ||
var_dump(' | var_dump(' | ||
</ | </ | ||
+ | |||
+ | ==== Types to support ==== | ||
+ | This proposal covers only concrete scalar types '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | All attempts to check against these types would evaluate to '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | ==== Legacy type aliases ==== | ||
+ | |||
+ | |||
+ | ==== Constant expressions on the left hand side ==== | ||
+ | The current implementation has a shortcut where if there is a constant expression to the left of '' | ||
+ | * In Java, a variable is required on the left side of '' | ||
+ | * In C#, constant expressions to the left of '' | ||
+ | * None of these support type names as strings, so the latter use case has no direct analogs. | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== |
rfc/instanceof_improvements.txt · Last modified: 2022/04/18 10:51 by ilutov