Using var_dump($this) in class that extends Exception

can someone try this and see if they get the same result? or maybe knows whats happening?

if i extend the php exception class and within the constructor call “var_dump($this);”

i get an infinite loop… but im not quite sure if this is php behaviour or whether its my set up or maybe slim

i could understand an error but an infinite loop is pretty sketchy

run it as is and it should execute fine, but for me uncommenting the // extends \Exception

results in an infinite loop of some kind

 * ExampleException.php
namespace app\exception;

class ExampleException // extends \Exception
    public function __construct($message = null)
        //if i extend exception the following line results in infinite loop 

and run it from somewhere

throw new \app\exception\ExampleException(‘why it do like that’);

Hi! You can try it here in isolation:

hmm it seems to execute fine

i guess i must have something else going on somewhere