- assert: documentation ( source)
- set_error_handler: documentation ( source)
<?php
class Foo {
static function register() {
set_error_handler('static::handleError');
}
static function handleError() {
echo 'ERROR!!!';
}
}
Foo::register();
assert(is_string(null));