diff --git a/core/modules/php/lib/Drupal/php/Plugin/Core/Condition/Php.php b/core/modules/php/lib/Drupal/php/Plugin/Core/Condition/Php.php
new file mode 100644
index 0000000..154d76b
--- /dev/null
+++ b/core/modules/php/lib/Drupal/php/Plugin/Core/Condition/Php.php
@@ -0,0 +1,81 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\php\Plugin\Core\Condition\Php.
+ */
+
+namespace Drupal\php\Plugin\Core\Condition;
+
+use Drupal\Core\Condition\ConditionPluginBase;
+use Drupal\Core\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+
+/**
+ * Provides a 'Php' condition.
+ *
+ * @Plugin(
+ *   id = "php",
+ *   label = @Translation("PHP"),
+ *   module = "php"
+ * )
+ */
+class Php extends ConditionPluginBase {
+
+  /**
+   * Overrides \Drupal\Core\Condition\ConditionPluginBase::buildForm().
+   */
+  public function buildForm(array $form, array &$form_state) {
+    if (empty($this->configuration['php'])) {
+      // Initialize an empty value.
+      $this->configuration['php'] = FALSE;
+    }
+    if (user_access('use PHP for settings')) {
+      $form['php'] = array(
+        '#type' => 'textarea',
+        '#title' => t('When the following PHP return TRUE (experts only)'),
+        '#default_value' => $this->configuration['php'],
+        '#description' => t('Enter PHP code between <?php ?>. Note that executing incorrect PHP code can break your Drupal site. Return TRUE in order for this condition to evaluate as TRUE.')
+      );
+    }
+    else {
+      $form['php'] = array(
+        '#type' => 'value',
+        '#value' => $this->configuration['php']
+      );
+    }
+    return parent::buildForm($form, $form_state);
+  }
+
+  /**
+   * Overrides \Drupal\Core\Condition\ConditionPluginBase::submitForm().
+   */
+  public function submitForm(array &$form, array &$form_state) {
+    $this->configuration['php'] = $form_state['values']['php'];
+    parent::submitForm($form, $form_state);
+  }
+
+  /**
+   * Implements \Drupal\Core\Executable\ExecutableInterface::summary().
+   */
+  public function summary() {
+    if (!empty($this->configuration['php'])) {
+      return t('When the given PHP evaluates as @state.',
+        array(
+          '@state' => !empty($this->configuration['negate']) ? 'FALSE' : 'TRUE'
+        )
+      );
+    }
+    else {
+      return t('No PHP code has been provided.');
+    }
+  }
+
+  /**
+   * Implements \Drupal\condition\ConditionInterface::evaluate().
+   */
+  public function evaluate() {
+    return php_eval($this->configuration['php']);
+  }
+
+}
diff --git a/core/modules/php/lib/Drupal/php/Tests/Condition/PhpConditionTest.php b/core/modules/php/lib/Drupal/php/Tests/Condition/PhpConditionTest.php
new file mode 100644
index 0000000..e0c7a62
--- /dev/null
+++ b/core/modules/php/lib/Drupal/php/Tests/Condition/PhpConditionTest.php
@@ -0,0 +1,76 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\php\Tests\Condition\PhpConditionTest.
+ */
+
+namespace Drupal\php\Tests\Condition;
+
+use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\Core\Condition\ConditionManager;
+use Drupal\user\Plugin\Core\Entity\User;
+
+/**
+ * Tests the php condition.
+ */
+class PhpConditionTest extends DrupalUnitTestBase {
+
+  /**
+   * The condition plugin manager.
+   *
+   * @var \Drupal\Core\Condition\ConditionManager
+   */
+  protected $manager;
+
+  public static $modules = array('system', 'php');
+
+  /**
+   * Defines test information.
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'PHP Condition Plugin',
+      'description' => 'Tests that the PHP Condition, provided by the php module, is working properly.',
+      'group' => 'Condition API',
+    );
+  }
+
+  /**
+   * Sets up the tests.
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->manager = new ConditionManager($this->container->getParameter('container.namespaces'));
+  }
+
+  /**
+   * Tests conditions.
+   */
+  public function testConditions() {
+    // Grab the php condition and configure it to check against a php snippet.
+    $condition = $this->manager->createInstance('php')
+      ->setConfig('php', '<?php return TRUE; ?>');
+    $this->assertTRUE($condition->execute(), 'PHP condition passes as expected.');
+    // Check for the proper summary.
+    $this->assertEqual('When the given PHP evaluates as TRUE.', $condition->summary());
+
+    // Set the php snippet to return FALSE.
+    $condition->setConfig('php', '<?php return FALSE; ?>');
+    $this->assertFalse($condition->execute(), 'PHP condition fails as expected.');
+
+    // Negate the condition.
+    $condition->setConfig('negate', TRUE);
+    // Check for the proper summary.
+    $this->assertEqual('When the given PHP evaluates as FALSE.', $condition->summary());
+
+    // Reverse the negation.
+    $condition->setConfig('negate', FALSE);
+    // Set and empty snippet.
+    $condition->setConfig('php', FALSE);
+    // Check for the proper summary.
+    $this->assertEqual('No PHP code has been provided.', $condition->summary());
+  }
+
+}
