http://www.phpclasses.org/browse/package/1743.html

examine this package as a possible replacement for the internals.