You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
token_get_all with TOKEN_PARSE types the visibility in a as protected; as T_STRING instead of T_PROTECTED #343
token_get_all with TOKEN_PARSE types the visibility in a as protected; as T_STRING instead of T_PROTECTED.
Repro
<?php$src = "<?php class A { use T { a as protected; b as private c; } }";
foreach (token_get_all($src, TOKEN_PARSE) as$t) {
if (is_array($t) && $t[0] !== T_WHITESPACE) { echotoken_name($t[0]), '', $t[1], "\n"; }
}
Expected (php)
T_OPEN_TAG <?php
T_CLASS class
T_STRING A
T_USE use
T_STRING T
T_STRING a
T_AS as
T_PROTECTED protected
T_STRING b
T_AS as
T_PRIVATE private
T_STRING c
Actual (manticore fe5476b4, Darwin arm64)
T_OPEN_TAG <?php
T_CLASS class
T_STRING A
T_USE use
T_STRING T
T_STRING a
T_AS as
T_STRING protected
T_STRING b
T_AS as
T_PRIVATE private
T_STRING c
Tracking
Known-bug repro: tests/aot/repro/wrong/token_get_all_trait_alias_visibility.php — bash tests/aot/xfail.sh -k token_get_all_trait_alias_visibility reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Activity