- var_dump: documentation ( source)
- set_exception_handler: documentation ( source)
- set_error_handler: documentation ( source)
- ini_get: documentation ( source)
<?php
var_dump(ini_get('zend.enable_gc'));
class A
{
public static $B = array();
}
class Controller
{
public function throwException()
{
throw new Exception("Test");
}
}
class ExceptionHandler
{
public function __construct()
{
set_exception_handler($this);
}
public function __invoke(Exception $e)
{
echo $exception->getMessage();
}
}
function error($no, $message)
{
throw new Exception($message);
}
set_error_handler('error');
A::$B['Handler'] = new ExceptionHandler;
A::$B['Controller'] = new Controller;
A::$B['Controller']->throwException();