True for a PHP class/namespace name: identifier segments joined by '\'. */
| 3006 | |
| 3007 | /* True for a PHP class/namespace name: identifier segments joined by '\'. */ |
| 3008 | static bool php_is_class_path(const char *s) { |
| 3009 | if (!s || !s[0]) { |
| 3010 | return false; |
| 3011 | } |
| 3012 | for (; *s; s++) { |
| 3013 | if (!((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') || (*s >= '0' && *s <= '9') || |
| 3014 | *s == '_' || *s == '\\')) { |
| 3015 | return false; |
| 3016 | } |
| 3017 | } |
| 3018 | return true; |
| 3019 | } |
| 3020 | |
| 3021 | /* Qualify a class name the way PHP resolves it: a leading '\' is already |
| 3022 | * absolute; a first segment that a `use` clause imports (by alias or by last |
no outgoing calls
no test coverage detected