<?php class LogoutAction implements IAction { public function execute() { session_regenerate_id(); session_destroy(); return array("success" => "Session logged out."); } }