diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index 16ff32b72062c475b43c978efa8df06d47a67577..afcb6b271575cf766c851c964e210b97a9a37622 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -49,7 +49,7 @@ function dw_dir_filter($entry, $basepath) {
 
 #------------------------------------------------------------------------------
 function dw_get_pages($dir) {
-    static $trunclen = NULL;
+    static $trunclen = null;
     if ( !$trunclen ) {
         global $conf;
         $trunclen = strlen($conf['datadir'].':');
diff --git a/inc/parser/code.php b/inc/parser/code.php
index 6e159b04173c799714c827d25856d536373c187a..0b8e3ee026fb7f5cceb83a3f7723e3a02a6f2f04 100644
--- a/inc/parser/code.php
+++ b/inc/parser/code.php
@@ -15,7 +15,7 @@ class Doku_Renderer_code extends Doku_Renderer {
      *
      * When the correct block was found it exits the script.
      */
-    function code($text, $language = NULL, $filename='' ) {
+    function code($text, $language = null, $filename='' ) {
         global $INPUT;
         if(!$language) $language = 'txt';
         if(!$filename) $filename = 'snippet.'.$language;
@@ -36,7 +36,7 @@ class Doku_Renderer_code extends Doku_Renderer {
     /**
      * Wraps around code()
      */
-    function file($text, $language = NULL, $filename='') {
+    function file($text, $language = null, $filename='') {
         $this->code($text, $language, $filename);
     }
 
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index b2d0f9df4cdbe8b037af2a5f9cc017ff2a0c8a20..6e6cca1a94e8777a03986aaee955e634b9973444 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -4,9 +4,9 @@ if (!defined('DOKU_PARSER_EOL')) define('DOKU_PARSER_EOL',"\n");   // add this t
 
 class Doku_Handler {
 
-    var $Renderer = NULL;
+    var $Renderer = null;
 
-    var $CallWriter = NULL;
+    var $CallWriter = null;
 
     var $calls = array();
 
@@ -423,7 +423,7 @@ class Doku_Handler {
         // Split title from URL
         $link = explode('|',$link,2);
         if ( !isset($link[1]) ) {
-            $link[1] = NULL;
+            $link[1] = null;
         } else if ( preg_match('/^\{\{[^\}]+\}\}$/',$link[1]) ) {
             // If the title is an image, convert it to an array containing the image details
             $link[1] = Doku_Handler_Parse_Media($link[1]);
@@ -481,12 +481,12 @@ class Doku_Handler {
     }
 
     function filelink($match, $state, $pos) {
-        $this->_addCall('filelink',array($match, NULL), $pos);
+        $this->_addCall('filelink',array($match, null), $pos);
         return true;
     }
 
     function windowssharelink($match, $state, $pos) {
-        $this->_addCall('windowssharelink',array($match, NULL), $pos);
+        $this->_addCall('windowssharelink',array($match, null), $pos);
         return true;
     }
 
@@ -550,7 +550,7 @@ class Doku_Handler {
 
     function emaillink($match, $state, $pos) {
         $email = preg_replace(array('/^</','/>$/'),'',$match);
-        $this->_addCall('emaillink',array($email, NULL), $pos);
+        $this->_addCall('emaillink',array($email, null), $pos);
         return true;
     }
 
@@ -631,12 +631,12 @@ function Doku_Handler_Parse_Media($match) {
     } else if ( $lalign ) {
         $align = 'left';
     } else {
-        $align = NULL;
+        $align = null;
     }
 
     // The title...
     if ( !isset($link[1]) ) {
-        $link[1] = NULL;
+        $link[1] = null;
     }
 
     //remove aligning spaces
@@ -654,11 +654,11 @@ function Doku_Handler_Parse_Media($match) {
 
     //parse width and height
     if(preg_match('#(\d+)(x(\d+))?#i',$param,$size)){
-        ($size[1]) ? $w = $size[1] : $w = NULL;
-        ($size[3]) ? $h = $size[3] : $h = NULL;
+        ($size[1]) ? $w = $size[1] : $w = null;
+        ($size[3]) ? $h = $size[3] : $h = null;
     } else {
-        $w = NULL;
-        $h = NULL;
+        $w = null;
+        $h = null;
     }
 
     //get linking command
@@ -1247,12 +1247,12 @@ class Doku_Handler_Table {
             }
 
             $this->tableCalls[] = array($this->lastCellType.'_close',array(),$call[2]);
-            $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]);
+            $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]);
             $this->lastCellType = $call[0];
 
         } else {
 
-            $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]);
+            $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]);
             $this->lastCellType = $call[0];
             $this->firstCell = false;
 
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 2d9da823db1d81fa42da3a4f90cea96cfcd44fcb..094c3ad0551096ff6e8c4eb8317c3c889867733d 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -221,7 +221,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function code($text, $language = NULL, $file = null){
+    function code($text, $language = null, $file = null){
         if ($this->capture){
             $this->doc .= DOKU_LF.$text;
             if (strlen($this->doc) > 250) $this->capture = false;
@@ -274,12 +274,12 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         $this->internallink($link, $link);
     }
 
-    function locallink($hash, $name = NULL){}
+    function locallink($hash, $name = null){}
 
     /**
      * keep track of internal links in $this->meta['relation']['references']
      */
-    function internallink($id, $name = NULL){
+    function internallink($id, $name = null){
         global $ID;
 
         if(is_array($name)) {
@@ -311,7 +311,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function externallink($url, $name = NULL){
+    function externallink($url, $name = null){
         if(is_array($name)) {
             $this->_firstimage($name['src']);
             if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
@@ -322,7 +322,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function interwikilink($match, $name = NULL, $wikiName, $wikiUri){
+    function interwikilink($match, $name = null, $wikiName, $wikiUri){
         if(is_array($name)) {
             $this->_firstimage($name['src']);
             if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
@@ -335,7 +335,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function windowssharelink($url, $name = NULL){
+    function windowssharelink($url, $name = null){
         if(is_array($name)) {
             $this->_firstimage($name['src']);
             if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
@@ -347,7 +347,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function emaillink($address, $name = NULL){
+    function emaillink($address, $name = null){
         if(is_array($name)) {
             $this->_firstimage($name['src']);
             if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
@@ -359,15 +359,15 @@ class Doku_Renderer_metadata extends Doku_Renderer {
         }
     }
 
-    function internalmedia($src, $title=NULL, $align=NULL, $width=NULL,
-                           $height=NULL, $cache=NULL, $linking=NULL){
+    function internalmedia($src, $title=null, $align=null, $width=null,
+                           $height=null, $cache=null, $linking=null){
         if ($this->capture && $title) $this->doc .= '['.$title.']';
         $this->_firstimage($src);
         $this->_recordMediaUsage($src);
     }
 
-    function externalmedia($src, $title=NULL, $align=NULL, $width=NULL,
-                           $height=NULL, $cache=NULL, $linking=NULL){
+    function externalmedia($src, $title=null, $align=null, $width=null,
+                           $height=null, $cache=null, $linking=null){
         if ($this->capture && $title) $this->doc .= '['.$title.']';
         $this->_firstimage($src);
     }
@@ -427,7 +427,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
      *
      * @author Harry Fuecks <hfuecks@gmail.com>
      */
-    function _getLinkTitle($title, $default, $id=NULL) {
+    function _getLinkTitle($title, $default, $id=null) {
         global $conf;
 
         $isImage = false;
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 4f99c668df5617a509464633b6850eb3628b8bcd..c697e990c0247f6c705f9717e2875712ba0d594c 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -203,42 +203,42 @@ class Doku_Renderer extends DokuWiki_Plugin {
     // $link like 'SomePage'
     function camelcaselink($link) {}
 
-    function locallink($hash, $name = NULL) {}
+    function locallink($hash, $name = null) {}
 
     // $link like 'wiki:syntax', $title could be an array (media)
-    function internallink($link, $title = NULL) {}
+    function internallink($link, $title = null) {}
 
     // $link is full URL with scheme, $title could be an array (media)
-    function externallink($link, $title = NULL) {}
+    function externallink($link, $title = null) {}
 
     function rss ($url,$params) {}
 
     // $link is the original link - probably not much use
     // $wikiName is an indentifier for the wiki
     // $wikiUri is the URL fragment to append to some known URL
-    function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {}
+    function interwikilink($link, $title = null, $wikiName, $wikiUri) {}
 
     // Link to file on users OS, $title could be an array (media)
-    function filelink($link, $title = NULL) {}
+    function filelink($link, $title = null) {}
 
     // Link to a Windows share, , $title could be an array (media)
-    function windowssharelink($link, $title = NULL) {}
+    function windowssharelink($link, $title = null) {}
 
-//  function email($address, $title = NULL) {}
-    function emaillink($address, $name = NULL) {}
+//  function email($address, $title = null) {}
+    function emaillink($address, $name = null) {}
 
-    function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
-                            $height=NULL, $cache=NULL, $linking=NULL) {}
+    function internalmedia ($src, $title=null, $align=null, $width=null,
+                            $height=null, $cache=null, $linking=null) {}
 
-    function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
-                            $height=NULL, $cache=NULL, $linking=NULL) {}
+    function externalmedia ($src, $title=null, $align=null, $width=null,
+                            $height=null, $cache=null, $linking=null) {}
 
     function internalmedialink (
-        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
+        $src,$title=null,$align=null,$width=null,$height=null,$cache=null
         ) {}
 
     function externalmedialink(
-        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
+        $src,$title=null,$align=null,$width=null,$height=null,$cache=null
         ) {}
 
     function table_open($maxcols = null, $numrows = null, $pos = null){}
@@ -249,11 +249,11 @@ class Doku_Renderer extends DokuWiki_Plugin {
 
     function tablerow_close(){}
 
-    function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){}
+    function tableheader_open($colspan = 1, $align = null, $rowspan = 1){}
 
     function tableheader_close(){}
 
-    function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){}
+    function tablecell_open($colspan = 1, $align = null, $rowspan = 1){}
 
     function tablecell_close(){}
 
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 84d837c088d5006911c92a9c5933d428b5c7d120..a719bca2618b48e790cb87549e83c444182779d2 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -547,7 +547,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
     }
 
 
-    function locallink($hash, $name = NULL){
+    function locallink($hash, $name = null){
         global $ID;
         $name  = $this->_getLinkTitle($name, $hash, $isImage);
         $hash  = $this->_headerToLink($hash);
@@ -565,7 +565,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
      *
      * @author Andreas Gohr <andi@splitbrain.org>
      */
-    function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') {
+    function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') {
         global $conf;
         global $ID;
         global $INFO;
@@ -644,7 +644,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         }
     }
 
-    function externallink($url, $name = NULL) {
+    function externallink($url, $name = null) {
         global $conf;
 
         $name = $this->_getLinkTitle($name, $url, $isImage);
@@ -687,7 +687,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
 
     /**
     */
-    function interwikilink($match, $name = NULL, $wikiName, $wikiUri) {
+    function interwikilink($match, $name = null, $wikiName, $wikiUri) {
         global $conf;
 
         $link = array();
@@ -721,7 +721,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
 
     /**
      */
-    function windowssharelink($url, $name = NULL) {
+    function windowssharelink($url, $name = null) {
         global $conf;
         global $lang;
         //simple setup
@@ -747,7 +747,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         $this->doc .= $this->_formatLink($link);
     }
 
-    function emaillink($address, $name = NULL) {
+    function emaillink($address, $name = null) {
         global $conf;
         //simple setup
         $link = array();
@@ -782,8 +782,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         $this->doc .= $this->_formatLink($link);
     }
 
-    function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
-                            $height=NULL, $cache=NULL, $linking=NULL) {
+    function internalmedia ($src, $title=null, $align=null, $width=null,
+                            $height=null, $cache=null, $linking=null) {
         global $ID;
         list($src,$hash) = explode('#',$src,2);
         resolve_mediaid(getNS($ID),$src, $exists);
@@ -818,8 +818,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         else $this->doc .= $this->_formatLink($link);
     }
 
-    function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
-                            $height=NULL, $cache=NULL, $linking=NULL) {
+    function externalmedia ($src, $title=null, $align=null, $width=null,
+                            $height=null, $cache=null, $linking=null) {
         list($src,$hash) = explode('#',$src,2);
         $noLink = false;
         $render = ($linking == 'linkonly') ? false : true;
@@ -959,7 +959,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         $this->doc .= DOKU_LF . DOKU_TAB . '</tr>' . DOKU_LF;
     }
 
-    function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){
+    function tableheader_open($colspan = 1, $align = null, $rowspan = 1){
         $class = 'class="col' . $this->_counter['cell_counter']++;
         if ( !is_null($align) ) {
             $class .= ' '.$align.'align';
@@ -980,7 +980,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         $this->doc .= '</th>';
     }
 
-    function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){
+    function tablecell_open($colspan = 1, $align = null, $rowspan = 1){
         $class = 'class="col' . $this->_counter['cell_counter']++;
         if ( !is_null($align) ) {
             $class .= ' '.$align.'align';
@@ -1046,8 +1046,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
      *
      * @author Andreas Gohr <andi@splitbrain.org>
      */
-    function _media ($src, $title=NULL, $align=NULL, $width=NULL,
-                      $height=NULL, $cache=NULL, $render = true) {
+    function _media ($src, $title=null, $align=null, $width=null,
+                      $height=null, $cache=null, $render = true) {
 
         $ret = '';
 
@@ -1149,7 +1149,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
      *
      * @author Harry Fuecks <hfuecks@gmail.com>
      */
-    function _getLinkTitle($title, $default, & $isImage, $id=NULL, $linktype='content') {
+    function _getLinkTitle($title, $default, & $isImage, $id=null, $linktype='content') {
         global $conf;
 
         $isImage = false;
diff --git a/inc/subscription.php b/inc/subscription.php
index 4248e4b111034a9f1f20b918b385b1317614495d..ecbc9ef19e7c470eafe240f161438d5283cfaf44 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -617,7 +617,7 @@ class Subscription {
      * @param string $rev The revision of the page, set to the current revision of the page $id if not set
      * @return string
      */
-    protected function getMessageID($id, $rev = NULL) {
+    protected function getMessageID($id, $rev = null) {
         static $listid = null;
         if (is_null($listid)) {
             $server = parse_url(DOKU_URL, PHP_URL_HOST);
@@ -694,4 +694,4 @@ class Subscription {
 function subscription_addresslist(&$data) {
     $sub = new Subscription();
     $sub->notifyaddresses($data);
-}
\ No newline at end of file
+}
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 404560548a8b2297842d2e8f9d3761ec9203dfb2..835d277759af4637b3cd89bd7ab23d29437bbd65 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -52,7 +52,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
         $this->_input = $INPUT->arr('config');
 
         while (list($key) = each($this->_config->setting)) {
-            $input = isset($this->_input[$key]) ? $this->_input[$key] : NULL;
+            $input = isset($this->_input[$key]) ? $this->_input[$key] : null;
             if ($this->_config->setting[$key]->update($input)) {
                 $this->_changed = true;
             }
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index 954178bc1047575339b014e2180acbd950688e0d..d0f99fa8ff7b3eb3130813fdee305b9d45bb8eab 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -8,7 +8,7 @@
 if (!class_exists('setting_sepchar')) {
     class setting_sepchar extends setting_multichoice {
 
-        function setting_sepchar($key,$param=NULL) {
+        function setting_sepchar($key,$param=null) {
             $str = '_-.';
             for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
 
diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php
index de4de6aef28dab39ae1abd052b54c1c7d73fd5d0..72c58620d9ce4e7ecf918c465b5aa35c0d6f6bd8 100644
--- a/lib/plugins/plugin/admin.php
+++ b/lib/plugins/plugin/admin.php
@@ -37,7 +37,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
     /**
      * @var ap_manage
      */
-    var $handler = NULL;
+    var $handler = null;
 
     var $functions = array('delete','update',/*'settings',*/'info');  // require a plugin name
     var $commands = array('manage','download','enable');              // don't require a plugin name
@@ -109,7 +109,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
         $this->setupLocale();
         $this->_get_plugin_list();
 
-        if ($this->handler === NULL) $this->handler = new ap_manage($this, $this->plugin);
+        if ($this->handler === null) $this->handler = new ap_manage($this, $this->plugin);
 
         ptln('<div id="plugin__manager">');
         $this->handler->html();
diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php
index 44926c035e7e65fd2f128aef635b7a15dbffaeb9..dfeb52b9dbd133162cf04dc2a50d0d96e9ee1ec7 100644
--- a/lib/plugins/plugin/classes/ap_info.class.php
+++ b/lib/plugins/plugin/classes/ap_info.class.php
@@ -15,7 +15,7 @@ class ap_info extends ap_manage {
 
 
         foreach ($component_list as $component) {
-            if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === NULL) continue;
+            if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === null) continue;
 
             $compname = explode('_',$component['name']);
             if($compname[1]){
diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php
index 3ec740dae8de6a9fda9ea1f5e7e74cb4859681e3..48be6305065cdd9260c33b8a966ce852b9d5c9d9 100644
--- a/lib/plugins/plugin/classes/ap_manage.class.php
+++ b/lib/plugins/plugin/classes/ap_manage.class.php
@@ -2,7 +2,7 @@
 
 class ap_manage {
 
-    var $manager = NULL;
+    var $manager = null;
     var $lang = array();
     var $plugin = '';
     var $downloaded = array();
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index beff10ced4591af396f7807018656ced6c37c415..b65472e4cdf6900062dd9388a129928d2001e8ae 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -157,7 +157,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
             echo "<img $att />";
             echo '</a> ';
 
-            echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?NULL:$recent['id']);
+            echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?null:$recent['id']);
             echo ' – '.htmlspecialchars($recent['sum']);
 
             echo ' <span class="user">';