Field value as Views 3 block title
Sorry, I made a huge mistake. When I tried to achieve the same thing for the block title, I copied the code from the page header but didn't remove it from the page header. In other words, I used the PHP commands - exactly as described in the question - in the headers of two subviews of the same view simultaneously. To be more precise, the variable $view was used in two places, which caused an error.

When I replace $view = views_get_current_view();
$view->build_info['title'] = 'My Block Title'; with $view_block = views_get_current_view();
$view_block->build_info['title'] = 'My Block Title'; things work as desired!