Documentation
¶
Overview ¶
Package phpcode is the PHP backend for `sf code`: a structural summary of a PHP file (namespace, class/interface/trait/enum, extends/implements, attributes, enum cases, constructor deps, properties, method signatures) and single-method slicing. It reuses the shared VKCOM-based reader (internal/common/php), which normalizes PHP 8.2–8.5 to the 8.1 grammar.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Summarize ¶
Summarize writes the structural summary of the PHP file at path to w. When api is set and the file declares a class or trait, the methods block becomes the effective public surface — own methods plus those composed via traits and inherited from parent classes (see effectiveSurface). api implies the public-only filter. The json format stays structural (machine output); callers wanting the flattened surface use toon/md.
Types ¶
This section is empty.