From a design perspective?

I have yet to find a _single_ bit of PHP forum software that doesn't fail my "is-it-crapware" test. That being:

Code:
root@Thunder phpBB2# grep "global $db" *
common.php:* Remove variables created by register_globals from the global scope
common.php:// Grab global variables, re-cache if necessary
download.php:   global $user, $db, $config, $phpbb_root_path;
download.php:   global $config, $user, $db;
mcp.php:        global $forum_id, $topic_id, $post_id;
mcp.php:        global $auth, $db;
mcp.php:        global $db, $auth;
mcp.php:        global $auth, $db;
....
I'm truly astonished.. fudforum, smf, punbb, phpbb, vbulletin, every one of them is pure spaghetti.

Surely someone has written something decent?