Influence var_dump output of an object in PHP

Code
<?php

class Foo
{
    private $bar = 'bar';
    
    public function __debugInfo()
    {
        return [
            'notAProp' => 'this is not a property'
        ];
    }
}

dump(new Foo());
Result
^ Foo {#1390
-bar: "bar"
notAProp: "this is not a property"
}
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8