diff --git a/contextphp.module b/contextphp.module
index 46e1675..7274966 100644
--- a/contextphp.module
+++ b/contextphp.module
@@ -12,6 +12,12 @@ function contextphp_context_registry() {
       'plugin' => 'contextphp_condition_php',
     ),
   );
+  $registry['reactions'] = array(
+    'php' => array(
+      'title' => t('PHP code'),
+      'plugin' => 'contextphp_reaction_php',
+    )
+  );
   return $registry;
 }
 
@@ -28,6 +34,14 @@ function contextphp_context_plugins() {
       'parent' => 'context_condition',
     ),
   );
+  $plugins['contextphp_reaction_php'] = array(
+    'handler' => array(
+      'path' => drupal_get_path('module', 'contextphp') .'/plugins',
+      'file' => 'contextphp_reaction_php.inc',
+      'class' => 'contextphp_reaction_php',
+      'parent' => 'context_reaction',
+    ),
+  );
   return $plugins;
 }
 
@@ -39,4 +53,9 @@ function contextphp_init() {
   if (!empty($map['php']) && $plugin = context_get_plugin('condition', 'php')) {
     $plugin->execute();
   }
+
+  $map = context_reactions();
+  if (!empty($map['php']) && $plugin = context_get_plugin('reaction', 'php')) {
+    $plugin->execute();
+  }
 }
diff --git a/plugins/contextphp_reaction_php.inc b/plugins/contextphp_reaction_php.inc
new file mode 100644
index 0000000..d5fdf04
--- /dev/null
+++ b/plugins/contextphp_reaction_php.inc
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+
+/**
+ * PHP code as a Context reaction.
+ */
+class contextphp_reaction_php extends context_reaction {
+  /**
+   * Editor form.
+   */
+  function editor_form($context) {
+    $form['#type'] = 'value';
+    $form['#value'] = TRUE;
+    return $form;
+  }
+
+  /**
+   * Submit handler for editor form.
+   */
+  function editor_form_submit($context, $values) {
+    return array($values);
+  }
+
+  function options_form($context) {
+    $defaults = $this->fetch_from_context($context, 'options');
+    return array(
+      'phpcode' => array(
+        '#type' => 'textarea',
+        '#title' => t('PHP code'),
+        '#description' => t('Enter PHP code that returns TRUE if the condition shall be met. Do not use &lt;?php ?&gt;.'),
+        '#default_value' => $defaults['phpcode'],
+       ),
+    );
+  }
+
+  function execute() {
+    foreach (context_active_contexts() as $context) {
+      $options = $this->fetch_from_context($context, 'options');
+      if (!empty($options['phpcode'])) {
+        $code = '<?php ' . $options['phpcode'] . ' ?>';
+        drupal_eval($code);
+      }
+    }
+  }
+}
\ No newline at end of file
