Index: plugins/views/views_php_handler_field.inc
===================================================================
--- plugins/views/views_php_handler_field.inc	(revision 660)
+++ plugins/views/views_php_handler_field.inc	(working copy)
@@ -195,20 +195,13 @@
   }
 
   /**
-   * Implements views_handler_field#pre_render().
-   */
-  function pre_render(&$values) {
-    if (!empty($this->options['php_output'])) {
-      $this->php_output_lamda_function = create_function('$view, $handler, &$static, $row, $data, $value', ' ?>' . $this->options['php_output'] . '<?php ');
-    }
-  }
-
-  /**
    * Implements views_handler_field#render().
    */
   function render($values) {
     // Ecexute output PHP code.
-    if (!empty($this->options['php_output']) && isset($this->php_output_lamda_function)) {
+    if (!empty($this->options['php_output'])) {
+      $this->options['php_output'] = $this->tokenize_value($this->options['php_output'], 0);
+      $this->php_output_lamda_function = create_function('$view, $handler, &$static, $row, $data, $value', ' ?>' . $this->options['php_output'] . '<?php ');
       $normalized_row = new stdClass;
       foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
         $normalized_row->$field = isset($values->{$handler->field_alias}) ? $values->{$handler->field_alias} : NULL;
@@ -224,4 +217,26 @@
     }
     return $value;
   }
+  
+  function tokenize_value($value, $row_index) {
+    if (strpos($value, '[') !== FALSE || strpos($value, '!') !== FALSE || strpos($value, '%') !== FALSE) {
+      $fake_item = array(
+        'alter_text' => TRUE,
+        'text' => $value,
+      );
+
+      // Row tokens might be empty, for example for node row style.
+      $tokens = isset($this->row_tokens[$row_index]) ? $this->row_tokens[$row_index] : array();
+      if (!empty($this->view->style_plugin->render_tokens[0])) {
+        $tokens += $this->view->style_plugin->render_tokens[0];
 }
+
+      if ($tokens) {
+        $value = strtr($value, $tokens);
+      }
+    }
+
+    return $value;
+  }
+  
+}
