PHP code in contextual filter (Views)
Why don't you use entity metadata wrapper?  your code will be:

$node = menu_get_object();
    if ($node-&gt;type == 'trailer_videos'){
           $wrapper = entity_matadata_wrapper('node',$node);
           $mynode = $wrapper-&gt;field_trailer_video_of-&gt;value();
           return $my_node;
     }


If you don't want to use entity module, use kpr of devel module to get the right syntax, as Ollie said quotes are needed.