diff --git a/includes/export.inc b/includes/export.inc
index 0b85c2e..31f46b1 100644
--- a/includes/export.inc
+++ b/includes/export.inc
@@ -880,6 +880,21 @@ function ctools_var_export($var, $prefix = '') {
     // export and casting it back to an object when evaluated.
     $output = '(object) ' . ctools_var_export((array) $var, $prefix);
   }
+  else if (is_int($var)) {
+    $output = intval($var);
+  }
+  else if (is_numeric($var)) {
+    $floatval = floatval($var);
+    if (is_string($var) && ((string) $floatval !== $var)) {
+      // Do not convert a string to a number if the string
+      // representation of that number is not identical to the
+      // original value.
+      $output = var_export($var, TRUE);
+    }
+    else {
+      $output = $floatval;
+    }
+  }
   else if (is_bool($var)) {
     $output = $var ? 'TRUE' : 'FALSE';
   }
