rfc:token_as_object
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:token_as_object [2020/02/13 09:37] – created nikic | rfc:token_as_object [2020/02/13 10:28] – nikic | ||
---|---|---|---|
Line 46: | Line 46: | ||
</ | </ | ||
- | ==== Additional methods | + | ===== Open Questions ===== |
- | There are a few useful helper methods that could be added to the '' | + | ==== Construction method ==== |
+ | |||
+ | The RFC currently proposes | ||
+ | |||
+ | To make the functionality self-contained, | ||
+ | |||
+ | < | ||
+ | class PhpToken { | ||
+ | /** @return PhpToken[] | ||
+ | public function getAll(string $code, int $flags = 0); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== Additional methods ==== | ||
- | Three suggestions are given as PHP code below. The '' | + | There are a few useful helper methods that could be added to the '' |
<PHP> | <PHP> | ||
Line 88: | Line 101: | ||
T_DOC_COMMENT, | T_DOC_COMMENT, | ||
T_OPEN_TAG, | T_OPEN_TAG, | ||
- | T_BAD_CHARACTER, | ||
]); | ]); | ||
} | } |
rfc/token_as_object.txt · Last modified: 2020/11/12 13:33 by nikic