diff --git a/lib/Drupal/ctools/PhpExporter.php b/lib/Drupal/ctools/PhpExporter.php
new file mode 100644
index 0000000..1003a07
--- /dev/null
+++ b/lib/Drupal/ctools/PhpExporter.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\ctools\PhpExporter.
+ */
+
+namespace Drupal\ctools;
+
+/**
+ * Defines a ctools exporter which uses PHP to dump the config.
+ */
+class PhpExporter implements ExporterInterface {
+
+  /**
+   * Implements Drupal\ctools\ExporterInterface::export().
+   */
+  public function import($raw) {
+    $data = NULL;
+    // Generate some php code that saves the import data to the $data variable.
+    $string = '$data = ' . $raw . ';';
+    eval($string);
+    return $data;
+  }
+
+  /**
+   * Implements Drupal\ctools\ExporterInterface::export().
+   */
+  public function export($data) {
+    include_once DRUPAL_ROOT . '/core/includes/utility.inc';
+    return drupal_var_export($data);
+  }
+}
diff --git a/lib/Drupal/ctools/Tests/ExporterBaseTest.php b/lib/Drupal/ctools/Tests/ExporterBaseTest.php
new file mode 100644
index 0000000..ad79080
--- /dev/null
+++ b/lib/Drupal/ctools/Tests/ExporterBaseTest.php
@@ -0,0 +1,84 @@
+<?php
+
+/**
+* @file
+* Definition of Drupal\ctools\Tests\ExporterBaseTest.
+*/
+
+namespace Drupal\ctools\Tests;
+
+use Drupal\simpletest\UnitTestBase;
+use Drupal\ctools\PhpExporter;
+
+/**
+ * Provides a common foundation for Exporter Tests.
+ */
+class ExporterBaseTest extends UnitTestBase {
+  /**
+   * Return some test data and expected values.
+   *
+   * @return array
+   *   An array of arrays, which has two keys
+   *     - data: The actual data on the php side
+   *     - string: The exported string
+   */
+  protected function exporterData() {
+    $data = array();
+
+    // Export a number scalar.
+    $data['number-scalar'] = array(
+      'data' => 1,
+    );
+
+    // Export a number as string scalar.
+    $data['number-string-scalar'] = array(
+      'data' => '1',
+    );
+
+    // Export a boolean scalar.
+    $data['boolean-scalar'] = array(
+      'data' => TRUE,
+    );
+
+    // Export a random string scalar.
+    $random_name = $this->randomName();
+    $data['string-scalar'] = array(
+      'data' => $random_name,
+    );
+
+    // Export a simple array with a single key.
+    $array_data = array(
+      'foo' => 1,
+    );
+    $data['simple-array'] = array(
+      'data' => array('foo' => 1),
+    );
+
+    // Export a simple array with multiple keys.
+    $data['simple-array-multi'] = array(
+      'data' => array(
+        'foo' => 1,
+        'bar' => 'bar',
+        'baz' => TRUE,
+      ),
+    );
+
+    // Export an array with multiple levels.
+    $data['multi-level-array'] = array(
+      'data' => array(
+        'foo' => 'bar',
+        'beatles' => array(
+          'Ringo',
+          'Paul',
+        ),
+        'beatles_complex' => array(
+          'John' => array(
+            'job' => 'Singer',
+          ),
+        ),
+      ),
+    );
+
+    return $data;
+  }
+}
diff --git a/lib/Drupal/ctools/Tests/PhpExporterTest.php b/lib/Drupal/ctools/Tests/PhpExporterTest.php
new file mode 100644
index 0000000..1ab243e
--- /dev/null
+++ b/lib/Drupal/ctools/Tests/PhpExporterTest.php
@@ -0,0 +1,93 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\ctools\Tests\PhpExporterTest.
+ */
+
+namespace Drupal\ctools\Tests;
+
+use Drupal\simpletest\UnitTestBase;
+use Drupal\ctools\PhpExporter;
+use Drupal\ctools\Tests\ExporterBaseTest;
+
+/**
+ * Tests for the CTools php exporter.
+ */
+class PhpExporterTest extends ExporterBaseTest {
+  public static function getInfo() {
+    return array(
+      'name' => 'CTools PHP exporter tests',
+      'description' => 'Tests the exporter plugin which uses PHP.',
+      'group' => 'Chaos Tools Suite',
+    );
+  }
+
+  /**
+   * Return some test data and expected values.
+   *
+   * @return array
+   *   An array of arrays, which has two keys
+   *     - data: The actual data on the php side
+   *     - string: The exported string
+   */
+  protected function exporterData() {
+    $data = parent::exporterData();
+
+    $data['number-scalar']['string'] = "1";
+    $data['number-string-scalar']['string'] = "'1'";
+    $data['boolean-scalar']['string'] = "TRUE";
+    $data['string-scalar']['string'] = "'" . $data['string-scalar']['data'] . "'";
+    $data['simple-array']['string'] = "array(
+  'foo' => 1,
+)";
+
+    $data['simple-array-multi']['string'] = "array(
+  'foo' => 1,
+  'bar' => 'bar',
+  'baz' => TRUE,
+)";
+
+    $data['multi-level-array']['string'] = "array(
+  'foo' => 'bar',
+  'beatles' => array(
+    'Ringo',
+    'Paul',
+  ),
+  'beatles_complex' => array(
+    'John' => array(
+      'job' => 'Singer',
+    ),
+  ),
+)";
+
+    return $data;
+  }
+
+  /**
+   * Tests Drupal\ctools\PhpExporter::export().
+   */
+  public function testExport() {
+    $exporter = new PhpExporter();
+
+    $test_data = $this->exporterData();
+    foreach ($test_data as $info) {
+      $export_string = $exporter->export($info['data']);
+      $this->assertIdentical($info['string'], $export_string);
+    }
+  }
+
+  /**
+   * Tests Drupal\ctools\PhpExporter::import().
+   */
+  public function testImport() {
+    $exporter = new PhpExporter();
+
+    $test_data = $this->exporterData();
+    foreach ($test_data as $info) {
+      $data = $exporter->import($info['string']);
+      $this->assertIdentical($info['data'], $data);
+    }
+  }
+}
+
