diff --git a/Debug/WrappedListener.php b/Debug/WrappedListener.php index 4dba883..59f7c13 100644 --- a/Debug/WrappedListener.php +++ b/Debug/WrappedListener.php @@ -48,7 +48,7 @@ public function __construct(callable|array $listener, ?string $name, Stopwatch $ $this->callableRef .= '::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->pretty = $this->name = 'closure'; } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { $this->name = $class->name;