diff --git a/inc/compatibility.php b/inc/compatibility.php
new file mode 100644
index 0000000000000000000000000000000000000000..ae780e5ac88fa3ca26d6408d8b766e967674db43
--- /dev/null
+++ b/inc/compatibility.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * compatibility functions
+ *
+ * This file contains a few functions that might be missing from the PHP build
+ */
+
+if(!function_exists('ctype_space')) {
+    /**
+     * Check for whitespace character(s)
+     *
+     * @see ctype_space
+     * @param string $text
+     * @return bool
+     */
+    function ctype_space($text) {
+        if(!is_string($text)) return false; #FIXME original treats between -128 and 255 inclusive as ASCII chars
+        if(trim($text) === '') return true;
+        return false;
+    }
+}
+
+if(!function_exists('ctype_digit')) {
+    /**
+     * Check for numeric character(s)
+     *
+     * @see ctype_digit
+     * @param string $text
+     * @return bool
+     */
+    function ctype_digit($text) {
+        if(!is_string($text)) return false; #FIXME original treats between -128 and 255 inclusive as ASCII chars
+        if(preg_match('/^\d+$/', $text)) return true;
+        return false;
+    }
+}
\ No newline at end of file
diff --git a/inc/load.php b/inc/load.php
index 923671296c298e127fceb5b11ca10c8965aa465a..c5b40ffd8fcad1689b737314a7407e56208f449f 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -35,6 +35,7 @@ require_once(DOKU_INC.'inc/template.php');
 require_once(DOKU_INC.'inc/toolbar.php');
 require_once(DOKU_INC.'inc/utf8.php');
 require_once(DOKU_INC.'inc/auth.php');
+require_once(DOKU_INC.'inc/compatibility.php');
 
 /**
  * spl_autoload_register callback