MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / php_is_class_path

Function php_is_class_path

internal/cbm/extract_calls.c:3008–3019  ·  view source on GitHub ↗

True for a PHP class/namespace name: identifier segments joined by '\'. */

Source from the content-addressed store, hash-verified

3006
3007/* True for a PHP class/namespace name: identifier segments joined by '\'. */
3008static 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

Callers 2

php_qualify_classFunction · 0.85
php_class_literal_fqnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected