diff --git a/lib/Drupal/ctools/PhpExporter.php b/lib/Drupal/ctools/PhpExporter.php
new file mode 100644
index 0000000..2b01c39
--- /dev/null
+++ b/lib/Drupal/ctools/PhpExporter.php
@@ -0,0 +1,31 @@
+<?php
+
+/**
+* @file
+* Definition of Drupal\ctools\PhpExporter.
+*/
+
+namespace Drupal\ctools;
+
+class PhpExporter implements ExporterInterface {
+
+  /**
+   * @todo.
+   */
+  public function import($raw) {
+    debug($raw);
+    eval($raw);
+    debug(get_defined_vars());
+    return array();
+//    $vars = get_defined_vars();
+//    return array_pop($vars);
+  }
+
+  /**
+   * @todo.
+   */
+  public function export($data) {
+    ctools_include('export');
+    return ctools_var_export($data);
+  }
+}
diff --git a/lib/Drupal/ctools/Tests/PhpExporterTest.php b/lib/Drupal/ctools/Tests/PhpExporterTest.php
new file mode 100644
index 0000000..0bc90e2
--- /dev/null
+++ b/lib/Drupal/ctools/Tests/PhpExporterTest.php
@@ -0,0 +1,143 @@
+<?php
+
+/**
+ * @file
+ * Tests for the CTools php exporter.
+ */
+
+namespace Drupal\ctools\Tests;
+
+use Drupal\simpletest\UnitTestBase;
+use Drupal\ctools\PhpExporter;
+
+/**
+ * Tests export CRUD.
+ */
+class PhpExporterTest extends UnitTestBase {
+  public static function getInfo() {
+    return array(
+      'name' => 'CTools php exporter tests',
+      'description' => 'Test 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 = array();
+
+    // Export a number scalar.
+    $data[] = array(
+      'data' => 1,
+      'string' => "1",
+    );
+
+    // Export a number as string scalar.
+    $data[] = array(
+      'data' => '1',
+      'string' => "'1'",
+    );
+
+    // Export a boolean scalar.
+    $data[] = array(
+      'data' => TRUE,
+      'string' => "TRUE",
+    );
+
+    // Export a random string scalar.
+    $random_name = $this->randomName();
+    $data[] = array(
+      'data' => $random_name,
+      'string' => "'" . $random_name . "'",
+    );
+
+    // Export a simple array with a single key.
+    $array_data = array(
+      'foo' => 1,
+    );
+    $data[] = array(
+      'data' => array('foo' => 1),
+      'string' => "array(
+  'foo' => 1,
+)"
+    );
+
+    // Export a simple array with multiple keys.
+    $data[] = array(
+      'data' => array(
+        'foo' => 1,
+        'bar' => 'bar',
+        'baz' => TRUE,
+      ),
+      'string' => "array(
+  'foo' => 1,
+  'bar' => 'bar',
+  'baz' => TRUE,
+)"
+    );
+
+    // Export an array with multiple levels.
+    $data[] = array(
+      'data' => array(
+        'foo' => 'bar',
+        'beatles' => array(
+          'Ringo',
+          'Paul',
+        ),
+        'beatles_complex' => array(
+          'John' => array(
+            'job' => 'Singer',
+          ),
+        ),
+      ),
+      'string' => "array(
+  'foo' => 'bar',
+  'beatles' => array(
+    0 => 'Ringo',
+    1 => 'Paul',
+  ),
+  'beatles_complex' => array(
+    'John' => array(
+      'job' => 'Singer',
+    ),
+  ),
+)"
+    );
+
+    return $data;
+  }
+
+  /**
+   * Tests PhpExporter::export().
+   */
+  public function testExport() {
+    $exporter = new PhpExporter();
+
+    $test_data = $this->exporterData();
+    foreach ($test_data as $info) {
+      $export_string = $exporter->export($info['data']);
+      $this->assertEqual($info['string'], $export_string);
+    }
+  }
+
+  /**
+   * Tests PhpExporter::import().
+   */
+  public function testImport() {
+    $exporter = new PhpExporter();
+
+    $test_data = $this->exporterData();
+    foreach ($test_data as $info) {
+      $data = $exporter->import($info['string']);
+      $this->assertEqual($info['data'], $data);
+    }
+  }
+}
+
