session_start(); $_SESSION['bla'] = new Bla(); $_SESSION['bla']->dosomething(); class Bla { function dosomething() { echo "bla\n"; } } ?>