Get latest revision vid in views
Instead of views_php use something like this. Add it as a field - you just need a custom handler to call the revisioning function that returns the latest vid.

/*
* Implements hook_views_data_alter().
*/
function MYMODULE_views_data_alter(&amp;$data) {
  $data['node_revision']['latest_revision'] = array(
    'title' =&gt; t('Latest revision'),
    'help' =&gt; t('Get the latest vid.'),
    'group' =&gt; t('Content revision'),
    'real field' =&gt; 'nid',
    'field' =&gt; array(
      'handler' =&gt; 'MYMODULE_field_handler_latest_revision',
      'click sortable' =&gt; TRUE,
    ),
  );
}


And the handler:

/**
 * Provide the latest revision number from the nid field.
 */
class MYMODULE_field_handler_latest_revision extends views_handler_field {

  // Return latest vid as the field value.
  public function render($values) {
    $value = $this-&gt;get_value($values);
    return revisioning_get_latest_revision_id($value);
  }
}