Changes specific to php5:
Added access modifiers
Added type hinting
Added Implements SplSubject
Added the use of custom Exception classes that extend Pear_Exception
Other changes:
Got rid of using $GLOBALS array
Refactored methods to get rid of duplicate code.
Extracted method postPendingEvents as a separate method
Extracted method notifyNestedDispatchers() as a separate method
Added separate method checkCallback($callback) to check that callback is valid
This method is used when adding and removing observers
Added methods attach(), detach(), notify() in order to implement SplSubject interface
Added option to use an object as an argument for addObserver()
Method getInstance() now takes a second argument $notificationClass which
Is the name of notification class and defaults to Event_Notification2
Added __toString() method, useful for logging and debugging purposes. It
Returns some basic info about the object like name of dispatcher and name of notification object