facebook/hiphop-php — pull request #1001 by javer (2013-08-29 10:58:18+00:00)
Title: Fixed automatic register_shutdown in session_set_save_handler

Do not register automatically session shutdown function when session_set_save_handler called in PHP <5.4 style.

PHP Manual (http://php.net/manual/en/function.session-set-save-handler.php):
> When using objects as session save handlers, it is important to register the shutdown function with PHP to avoid unexpected side-effects from the way PHP internally destroys objects on shutdown and may prevent the write and close from being called. Typically you should register 'session_write_close' using the register_shutdown_function() function.

Example N2 Custom session save handler using objects:
> Note we additionally register the shutdown function session_write_close() using register_shutdown_function() under PHP less than 5.4.0. This is generally advised when registering objects as session save handlers under PHP less than 5.4.0.