Initial commit

This commit is contained in:
2021-03-23 21:58:40 +01:00
commit 61623f5a35
30 changed files with 1936 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace IO;
use Throwable;
class ExceptionHandler
{
private static bool $registered = false;
public static function registerCallback(): void
{
if (self::$registered) {
return;
}
set_exception_handler(static function (Throwable $t) {
print($t->getMessage());
exit(1);
});
self::$registered = true;
}
}