- var_dump: documentation ( source)
- json_encode: documentation ( source)
- get_class: documentation ( source)
<?php
/*
* ExampleException.php
*
*/
namespace app\exception;
class ExampleException extends \Exception
{
public function __construct($message = null)
{
var_dump($message);
var_dump(get_class($this));
var_dump(json_encode($this));
//if i extend exception the following line results in infinite loop
var_dump($this);
die;
}
}
throw new \app\exception\ExampleException('why it do like that');