<?php
class Foo
{
private $bar = 'bar';
public function __debugInfo()
{
return [
'notAProp' => 'this is not a property'
];
}
}
dump(new Foo());
^ Foo {#1390
-bar: "bar"
: "this is not a property"
}