Repository navigation
Commit 1c4477f
committed
Resolve loose comparison of two strings or two integers as identical
Two strings of which one is not numeric, and two integers, cannot coerce,
so their loose comparison is the identical one. resolveEqualType() now
answers it through resolveIdenticalType() like the narrowing in
IdenticalNarrowingHelper already does, instead of computing the values
each side can loosely equal for every PHP version in the configured
range. A switch over a string with many case labels or a long chain of
`$string == 'constant'` conditions spent most of its time there.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1b250-12b7-7206-9d98-c1f38e89010e1 parent 317da9a commit 1c4477f
3 files changed
Lines changed: 4058 additions & 0 deletions
File tree
- src/Reflection
- tests/bench/data
- turbo-ext/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1188 | 1197 | | |
1189 | 1198 | | |
1190 | 1199 | | |
| |||
0 commit comments