class_uses()
function class_uses(mixed $object_or_class, bool $autoload = true): mixed
Returns the traits used by the given class.
Parameters:
$object_or_class(mixed)$autoload(bool), defaulttrue, optional
Returns: mixed
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/symbols/class_uses.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how class_uses is implemented in the compiler, see the internals page.