Skip to content

Instantly share code, notes, and snippets.

View aierui's full-sized avatar
🎯
Focusing

YIXIAO SHI aierui

🎯
Focusing
View GitHub Profile
@aierui
aierui / exceptions-tree.php
Created June 27, 2018 23:55 — forked from mlocati/exceptions-tree.php
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');