diff --git a/src/Symfony/Component/VarDumper/Caster/CutStub.php b/src/Symfony/Component/VarDumper/Caster/CutStub.php index 772399ef69f03..6870a9cd28dda 100644 --- a/src/Symfony/Component/VarDumper/Caster/CutStub.php +++ b/src/Symfony/Component/VarDumper/Caster/CutStub.php @@ -27,7 +27,7 @@ public function __construct(mixed $value) switch (\gettype($value)) { case 'object': $this->type = self::TYPE_OBJECT; - $this->class = $value::class; + $this->class = get_debug_type($value); if ($value instanceof \Closure) { ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE);