Download the PHP package typhoon/formatter without Composer
On this page you can find all versions of the php package typhoon/formatter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package formatter
Thesis Formatter
A collection of functions for formatting PHP values and code elements into human-readable strings. Useful for error messages, exceptions, and debugging output.
Installation
Functions
All functions are in the Thesis\Formatter namespace.
format(mixed $value): string
Formats any PHP value.
formatClass(string|object $class): string
Formats a class name. Anonymous classes get a readable file:line label.
formatFunction(callable $function): string
Formats a callable.
formatParameter(callable $function, int|string $parameter): string
Formats a parameter reference by index or name.
formatProperty(string|object $class, string $property): string
Formats a property reference.
Reflection-based functions
Convenient wrappers around the functions above.
| Function | Example output |
|---|---|
formatReflectedClass(\ReflectionClass $class) |
MyClass |
formatReflectedFunction(\ReflectionFunctionAbstract $function) |
MyClass::myMethod() |
formatReflectedParameter(\ReflectionParameter $parameter) |
MyClass::myMethod($param) |
formatReflectedProperty(\ReflectionProperty $property) |
MyClass::$name |
formatReflectedType(?\ReflectionType $type) |
string\|int, ?Foo, A&B |
All versions of formatter with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
The package typhoon/formatter contains the following files
Loading the files please wait ...