diff --git a/core/authorize.php b/core/authorize.php
index 26d310dda1a6386948e448eff04d095126582bdb..c6ba51dbf4da90ea0133ccdd60e9340570b35d0d 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -35,7 +35,7 @@
  * solve some theming issues. This flag is checked on several places
  * in Drupal code (not just authorize.php).
  */
-define('MAINTENANCE_MODE', 'update');
+const MAINTENANCE_MODE = 'update';
 
 /**
  * Renders a 403 access denied page for authorize.php.
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index e5b1829661fd4a71a39072af130f9b091b75335b..4d298eacaf92d3009ac82a0c7592aeadcfb3fbd5 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -8,34 +8,34 @@
 /**
  * The current system version.
  */
-define('VERSION', '8.0-dev');
+const VERSION = '8.0-dev';
 
 /**
  * Core API compatibility.
  */
-define('DRUPAL_CORE_COMPATIBILITY', '8.x');
+const DRUPAL_CORE_COMPATIBILITY = '8.x';
 
 /**
  * Minimum supported version of PHP.
  */
-define('DRUPAL_MINIMUM_PHP', '5.3.2');
+const DRUPAL_MINIMUM_PHP = '5.3.2';
 
 /**
  * Minimum recommended value of PHP memory_limit.
  */
-define('DRUPAL_MINIMUM_PHP_MEMORY_LIMIT', '32M');
+const DRUPAL_MINIMUM_PHP_MEMORY_LIMIT = '32M';
 
 /**
  * Indicates that the item should never be removed unless explicitly selected.
  *
  * The item may be removed using cache()->delete() with a cache ID.
  */
-define('CACHE_PERMANENT', 0);
+const CACHE_PERMANENT = 0;
 
 /**
  * Indicates that the item should be removed at the next general cache wipe.
  */
-define('CACHE_TEMPORARY', -1);
+const CACHE_TEMPORARY = -1;
 
 /**
  * @defgroup logging_severity_levels Logging severity levels
@@ -60,42 +60,42 @@
 /**
  * Log message severity -- Emergency: system is unusable.
  */
-define('WATCHDOG_EMERGENCY', 0);
+const WATCHDOG_EMERGENCY = 0;
 
 /**
  * Log message severity -- Alert: action must be taken immediately.
  */
-define('WATCHDOG_ALERT', 1);
+const WATCHDOG_ALERT = 1;
 
 /**
  * Log message severity -- Critical: critical conditions.
  */
-define('WATCHDOG_CRITICAL', 2);
+const WATCHDOG_CRITICAL = 2;
 
 /**
  * Log message severity -- Error: error conditions.
  */
-define('WATCHDOG_ERROR', 3);
+const WATCHDOG_ERROR = 3;
 
 /**
  * Log message severity -- Warning: warning conditions.
  */
-define('WATCHDOG_WARNING', 4);
+const WATCHDOG_WARNING = 4;
 
 /**
  * Log message severity -- Notice: normal but significant condition.
  */
-define('WATCHDOG_NOTICE', 5);
+const WATCHDOG_NOTICE = 5;
 
 /**
  * Log message severity -- Informational: informational messages.
  */
-define('WATCHDOG_INFO', 6);
+const WATCHDOG_INFO = 6;
 
 /**
  * Log message severity -- Debug: debug-level messages.
  */
-define('WATCHDOG_DEBUG', 7);
+const WATCHDOG_DEBUG = 7;
 
 /**
  * @} End of "defgroup logging_severity_levels".
@@ -104,98 +104,98 @@
 /**
  * First bootstrap phase: initialize configuration.
  */
-define('DRUPAL_BOOTSTRAP_CONFIGURATION', 0);
+const DRUPAL_BOOTSTRAP_CONFIGURATION = 0;
 
 /**
  * Second bootstrap phase: try to serve a cached page.
  */
-define('DRUPAL_BOOTSTRAP_PAGE_CACHE', 1);
+const DRUPAL_BOOTSTRAP_PAGE_CACHE = 1;
 
 /**
  * Third bootstrap phase: initialize database layer.
  */
-define('DRUPAL_BOOTSTRAP_DATABASE', 2);
+const DRUPAL_BOOTSTRAP_DATABASE = 2;
 
 /**
  * Fourth bootstrap phase: initialize the variable system.
  */
-define('DRUPAL_BOOTSTRAP_VARIABLES', 3);
+const DRUPAL_BOOTSTRAP_VARIABLES = 3;
 
 /**
  * Fifth bootstrap phase: initialize session handling.
  */
-define('DRUPAL_BOOTSTRAP_SESSION', 4);
+const DRUPAL_BOOTSTRAP_SESSION = 4;
 
 /**
  * Sixth bootstrap phase: set up the page header.
  */
-define('DRUPAL_BOOTSTRAP_PAGE_HEADER', 5);
+const DRUPAL_BOOTSTRAP_PAGE_HEADER = 5;
 
 /**
  * Seventh bootstrap phase: find out language of the page.
  */
-define('DRUPAL_BOOTSTRAP_LANGUAGE', 6);
+const DRUPAL_BOOTSTRAP_LANGUAGE = 6;
 
 /**
  * Final bootstrap phase: Drupal is fully loaded; validate and fix
  * input data.
  */
-define('DRUPAL_BOOTSTRAP_FULL', 7);
+const DRUPAL_BOOTSTRAP_FULL = 7;
 
 /**
  * Role ID for anonymous users; should match what's in the "role" table.
  */
-define('DRUPAL_ANONYMOUS_RID', 1);
+const DRUPAL_ANONYMOUS_RID = 1;
 
 /**
  * Role ID for authenticated users; should match what's in the "role" table.
  */
-define('DRUPAL_AUTHENTICATED_RID', 2);
+const DRUPAL_AUTHENTICATED_RID = 2;
 
 /**
  * The number of bytes in a kilobyte. For more information, visit
  * http://en.wikipedia.org/wiki/Kilobyte.
  */
-define('DRUPAL_KILOBYTE', 1024);
+const DRUPAL_KILOBYTE = 1024;
 
 /**
  * System language (only applicable to UI).
  *
  * Refers to the language used in Drupal and module/theme source code.
  */
-define('LANGUAGE_SYSTEM', 'system');
+const LANGUAGE_SYSTEM = 'system';
 
 /**
  * The language code used when no language is explicitly assigned.
  *
  * Defined by ISO639-2 for "Undetermined".
  */
-define('LANGUAGE_NONE', 'und');
+const LANGUAGE_NONE = 'und';
 
 /**
  * The type of language used to define the content language.
  */
-define('LANGUAGE_TYPE_CONTENT', 'language_content');
+const LANGUAGE_TYPE_CONTENT = 'language_content';
 
 /**
  * The type of language used to select the user interface.
  */
-define('LANGUAGE_TYPE_INTERFACE', 'language');
+const LANGUAGE_TYPE_INTERFACE = 'language';
 
 /**
  * The type of language used for URLs.
  */
-define('LANGUAGE_TYPE_URL', 'language_url');
+const LANGUAGE_TYPE_URL = 'language_url';
 
 /**
  * Language written left to right. Possible value of $language->direction.
  */
-define('LANGUAGE_LTR', 0);
+const LANGUAGE_LTR = 0;
 
 /**
  * Language written right to left. Possible value of $language->direction.
  */
-define('LANGUAGE_RTL', 1);
+const LANGUAGE_RTL = 1;
 
 /**
  * Time of the current request in seconds elapsed since the Unix Epoch.
@@ -212,29 +212,29 @@
 /**
  * Flag for drupal_set_title(); text is not sanitized, so run check_plain().
  */
-define('CHECK_PLAIN', 0);
+const CHECK_PLAIN = 0;
 
 /**
  * Flag for drupal_set_title(); text has already been sanitized.
  */
-define('PASS_THROUGH', -1);
+const PASS_THROUGH = -1;
 
 /**
  * Signals that the registry lookup cache should be reset.
  */
-define('REGISTRY_RESET_LOOKUP_CACHE', 1);
+const REGISTRY_RESET_LOOKUP_CACHE = 1;
 
 /**
  * Signals that the registry lookup cache should be written to storage.
  */
-define('REGISTRY_WRITE_LOOKUP_CACHE', 2);
+const REGISTRY_WRITE_LOOKUP_CACHE = 2;
 
 /**
  * Regular expression to match PHP function names.
  *
  * @see http://php.net/manual/en/language.functions.php
  */
-define('DRUPAL_PHP_FUNCTION_PATTERN', '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*');
+const DRUPAL_PHP_FUNCTION_PATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*';
 
 /**
  * Provides a caching wrapper to be used in place of large array structures.
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 722c1f67214c0bb158ded7d497346f29cc3e8010..c6a29b74665d8cb1fa0473063700fa815766bd36 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -42,59 +42,59 @@
 /**
  * Return status for saving which involved creating a new item.
  */
-define('SAVED_NEW', 1);
+const SAVED_NEW = 1;
 
 /**
  * Return status for saving which involved an update to an existing item.
  */
-define('SAVED_UPDATED', 2);
+const SAVED_UPDATED = 2;
 
 /**
  * Return status for saving which deleted an existing item.
  */
-define('SAVED_DELETED', 3);
+const SAVED_DELETED = 3;
 
 /**
  * The default group for system CSS files added to the page.
  */
-define('CSS_SYSTEM', -100);
+const CSS_SYSTEM = -100;
 
 /**
  * The default group for module CSS files added to the page.
  */
-define('CSS_DEFAULT', 0);
+const CSS_DEFAULT = 0;
 
 /**
  * The default group for theme CSS files added to the page.
  */
-define('CSS_THEME', 100);
+const CSS_THEME = 100;
 
 /**
  * The default group for JavaScript libraries or jQuery plugins added
  * to the page.
  */
-define('JS_LIBRARY', -100);
+const JS_LIBRARY = -100;
 
 /**
  * The default group for module JavaScript code added to the page.
  */
-define('JS_DEFAULT', 0);
+const JS_DEFAULT = 0;
 
 /**
  * The default group for theme JavaScript code added to the page.
  */
-define('JS_THEME', 100);
+const JS_THEME = 100;
 
 /**
  * The default group for JavaScript settings added to the page.
  */
-define('JS_SETTING', 200);
+const JS_SETTING = 200;
 
 /**
  * Error code indicating that the request made by drupal_http_request() exceeded
  * the specified timeout.
  */
-define('HTTP_REQUEST_TIMEOUT', -1);
+const HTTP_REQUEST_TIMEOUT = -1;
 
 /**
  * Constants defining cache granularity for blocks and renderable arrays.
@@ -121,7 +121,7 @@
  * the content.
  * - for blocks that change too frequently.
  */
-define('DRUPAL_NO_CACHE', -1);
+const DRUPAL_NO_CACHE = -1;
 
 /**
  * The block is handling its own caching in its hook_block_view(). From the
@@ -129,31 +129,31 @@
  * Useful when time based expiration is needed or a site uses a node access
  * which invalidates standard block cache.
  */
-define('DRUPAL_CACHE_CUSTOM', -2);
+const DRUPAL_CACHE_CUSTOM = -2;
 
 /**
  * The block or element can change depending on the roles the user viewing the
  * page belongs to. This is the default setting for blocks, used when the block
  * does not specify anything.
  */
-define('DRUPAL_CACHE_PER_ROLE', 0x0001);
+const DRUPAL_CACHE_PER_ROLE = 0x0001;
 
 /**
  * The block or element can change depending on the user viewing the page.
  * This setting can be resource-consuming for sites with large number of users,
  * and thus should only be used when DRUPAL_CACHE_PER_ROLE is not sufficient.
  */
-define('DRUPAL_CACHE_PER_USER', 0x0002);
+const DRUPAL_CACHE_PER_USER = 0x0002;
 
 /**
  * The block or element can change depending on the page being viewed.
  */
-define('DRUPAL_CACHE_PER_PAGE', 0x0004);
+const DRUPAL_CACHE_PER_PAGE = 0x0004;
 
 /**
  * The block or element is the same for every user on every page where it is visible.
  */
-define('DRUPAL_CACHE_GLOBAL', 0x0008);
+const DRUPAL_CACHE_GLOBAL = 0x0008;
 
 /**
  * Add content to a specified region.
diff --git a/core/includes/database/pgsql/database.inc b/core/includes/database/pgsql/database.inc
index d42a1cc3c63b454a31368c82c6418843a1212770..68300e55368e4bfd742e397f8fa3311df4bc19fb 100644
--- a/core/includes/database/pgsql/database.inc
+++ b/core/includes/database/pgsql/database.inc
@@ -13,7 +13,7 @@
 /**
  * The name by which to obtain a lock for retrive the next insert id.
  */
-define('POSTGRESQL_NEXTID_LOCK', 1000);
+const POSTGRESQL_NEXTID_LOCK = 1000;
 
 class DatabaseConnection_pgsql extends DatabaseConnection {
 
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 9d3b92a262a6064386be4d1d99d61c03275ad1ba..eaf2e2136818182f6dc65268336300668cbe8090 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -8,17 +8,17 @@
 /**
  * Error reporting level: display no errors.
  */
-define('ERROR_REPORTING_HIDE', 0);
+const ERROR_REPORTING_HIDE = 0;
 
 /**
  * Error reporting level: display errors and warnings.
  */
-define('ERROR_REPORTING_DISPLAY_SOME', 1);
+const ERROR_REPORTING_DISPLAY_SOME = 1;
 
 /**
  * Error reporting level: display all messages.
  */
-define('ERROR_REPORTING_DISPLAY_ALL', 2);
+const ERROR_REPORTING_DISPLAY_ALL = 2;
 
 /**
  * Map PHP error constants to watchdog severity levels.
diff --git a/core/includes/file.inc b/core/includes/file.inc
index 6e6611f3acd3e25aa1b9020c2789b762d2a17186..f00a6b9d5df2055c3dc70365216e63d31f96bdf3 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -38,27 +38,27 @@
 /**
  * Flag used by file_prepare_directory() -- create directory if not present.
  */
-define('FILE_CREATE_DIRECTORY', 1);
+const FILE_CREATE_DIRECTORY = 1;
 
 /**
  * Flag used by file_prepare_directory() -- file permissions may be changed.
  */
-define('FILE_MODIFY_PERMISSIONS', 2);
+const FILE_MODIFY_PERMISSIONS = 2;
 
 /**
  * Flag for dealing with existing files: Appends number until name is unique.
  */
-define('FILE_EXISTS_RENAME', 0);
+const FILE_EXISTS_RENAME = 0;
 
 /**
  * Flag for dealing with existing files: Replace the existing file.
  */
-define('FILE_EXISTS_REPLACE', 1);
+const FILE_EXISTS_REPLACE = 1;
 
 /**
  * Flag for dealing with existing files: Do nothing and return FALSE.
  */
-define('FILE_EXISTS_ERROR', 2);
+const FILE_EXISTS_ERROR = 2;
 
 /**
  * Indicates that the file is permanent and should not be deleted.
@@ -67,7 +67,7 @@
  * during cron runs, but permanent files will not be removed during the file
  * garbage collection process.
  */
-define('FILE_STATUS_PERMANENT', 1);
+const FILE_STATUS_PERMANENT = 1;
 
 /**
  * Methods to manage a registry of stream wrappers.
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index f9d8062f98e32875c13543c1a99ebf2c5fddf421..8f79e65411ce9cf837dac4792d76701976b3dd70 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -17,7 +17,7 @@
  * also uses this flag to skip language import tasks when the installation is
  * being performed in English.
  */
-define('INSTALL_TASK_SKIP', 1);
+const INSTALL_TASK_SKIP = 1;
 
 /**
  * Global flag to indicate that a task should be run on each installation
@@ -25,7 +25,7 @@
  *
  * This is primarily used by the Drupal installer for bootstrap-related tasks.
  */
-define('INSTALL_TASK_RUN_IF_REACHED', 2);
+const INSTALL_TASK_RUN_IF_REACHED = 2;
 
 /**
  * Global flag to indicate that a task should be run on each installation
@@ -39,7 +39,7 @@
  * modules on the new site, and also for the configuration form that collects
  * basic site information and sets up the site maintenance account.
  */
-define('INSTALL_TASK_RUN_IF_NOT_COMPLETED', 3);
+const INSTALL_TASK_RUN_IF_NOT_COMPLETED = 3;
 
 /**
  * Installs Drupal either interactively or via an array of passed-in settings.
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 470586c4b7c2e36a1f17577618f04235183ef8c1..8d7f22d784ec89942072184f9b5c323f70b6e88f 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -3,72 +3,72 @@
 /**
  * Indicates that a module has not been installed yet.
  */
-define('SCHEMA_UNINSTALLED', -1);
+const SCHEMA_UNINSTALLED = -1;
 
 /**
  * Indicates that a module has been installed.
  */
-define('SCHEMA_INSTALLED', 0);
+const SCHEMA_INSTALLED = 0;
 
 /**
  * Requirement severity -- Informational message only.
  */
-define('REQUIREMENT_INFO', -1);
+const REQUIREMENT_INFO = -1;
 
 /**
  * Requirement severity -- Requirement successfully met.
  */
-define('REQUIREMENT_OK', 0);
+const REQUIREMENT_OK = 0;
 
 /**
  * Requirement severity -- Warning condition; proceed but flag warning.
  */
-define('REQUIREMENT_WARNING', 1);
+const REQUIREMENT_WARNING = 1;
 
 /**
  * Requirement severity -- Error condition; abort installation.
  */
-define('REQUIREMENT_ERROR', 2);
+const REQUIREMENT_ERROR = 2;
 
 /**
  * File permission check -- File exists.
  */
-define('FILE_EXIST', 1);
+const FILE_EXIST = 1;
 
 /**
  * File permission check -- File is readable.
  */
-define('FILE_READABLE', 2);
+const FILE_READABLE = 2;
 
 /**
  * File permission check -- File is writable.
  */
-define('FILE_WRITABLE', 4);
+const FILE_WRITABLE = 4;
 
 /**
  * File permission check -- File is executable.
  */
-define('FILE_EXECUTABLE', 8);
+const FILE_EXECUTABLE = 8;
 
 /**
  * File permission check -- File does not exist.
  */
-define('FILE_NOT_EXIST', 16);
+const FILE_NOT_EXIST = 16;
 
 /**
  * File permission check -- File is not readable.
  */
-define('FILE_NOT_READABLE', 32);
+const FILE_NOT_READABLE = 32;
 
 /**
  * File permission check -- File is not writable.
  */
-define('FILE_NOT_WRITABLE', 64);
+const FILE_NOT_WRITABLE = 64;
 
 /**
  * File permission check -- File is not executable.
  */
-define('FILE_NOT_EXECUTABLE', 128);
+const FILE_NOT_EXECUTABLE = 128;
 
 /**
  * Initialize the update system by loading all installed module's .install files.
diff --git a/core/includes/language.inc b/core/includes/language.inc
index 073c694cac13e23053b22fef605489dae2deed03..1e335e2eb6735be158a63370d4b61c3d9ef4038b 100644
--- a/core/includes/language.inc
+++ b/core/includes/language.inc
@@ -8,7 +8,7 @@
 /**
  * No language negotiation. The default language is used.
  */
-define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default');
+const LANGUAGE_NEGOTIATION_DEFAULT = 'language-default';
 
 /**
  * Return all the defined language types.
diff --git a/core/includes/locale.inc b/core/includes/locale.inc
index 85d2a8bd73db2c65999bd79cdcd84811dbb79f00..4cd0c594dfe01a9a691cc41232e36206adef74c7 100644
--- a/core/includes/locale.inc
+++ b/core/includes/locale.inc
@@ -9,38 +9,38 @@
  * The language is determined using a URL language indicator:
  * path prefix or domain according to the configuration.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_URL', 'locale-url');
+const LOCALE_LANGUAGE_NEGOTIATION_URL = 'locale-url';
 
 /**
  * The language is set based on the browser language settings.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_BROWSER', 'locale-browser');
+const LOCALE_LANGUAGE_NEGOTIATION_BROWSER = 'locale-browser';
 
 /**
  * The language is determined using the current interface language.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_INTERFACE', 'locale-interface');
+const LOCALE_LANGUAGE_NEGOTIATION_INTERFACE = 'locale-interface';
 
 /**
  * If no URL language is available language is determined using an already
  * detected one.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACK', 'locale-url-fallback');
+const LOCALE_LANGUAGE_NEGOTIATION_URL_FALLBACK = 'locale-url-fallback';
 
 /**
  * The language is set based on the user language settings.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_USER', 'locale-user');
+const LOCALE_LANGUAGE_NEGOTIATION_USER = 'locale-user';
 
 /**
  * The language is set based on the request/session parameters.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_SESSION', 'locale-session');
+const LOCALE_LANGUAGE_NEGOTIATION_SESSION = 'locale-session';
 
 /**
  * Regular expression pattern used to localize JavaScript strings.
  */
-define('LOCALE_JS_STRING', '(?:(?:\'(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+');
+const LOCALE_JS_STRING = '(?:(?:\'(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+';
 
 /**
  * Regular expression pattern used to match simple JS object literal.
@@ -48,7 +48,7 @@
  * This pattern matches a basic JS object, but will fail on an object with
  * nested objects. Used in JS file parsing for string arg processing.
  */
-define('LOCALE_JS_OBJECT', '\{.*?\}');
+const LOCALE_JS_OBJECT = '\{.*?\}';
 
 /**
  * Regular expression to match an object containing a key 'context'.
@@ -76,25 +76,25 @@
  * Translation import mode overwriting all existing translations
  * if new translated version available.
  */
-define('LOCALE_IMPORT_OVERWRITE', 0);
+const LOCALE_IMPORT_OVERWRITE = 0;
 
 /**
  * Translation import mode keeping existing translations and only
  * inserting new strings.
  */
-define('LOCALE_IMPORT_KEEP', 1);
+const LOCALE_IMPORT_KEEP = 1;
 
 /**
  * URL language negotiation: use the path prefix as URL language
  * indicator.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX', 0);
+const LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX = 0;
 
 /**
  * URL language negotiation: use the domain as URL language
  * indicator.
  */
-define('LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN', 1);
+const LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN = 1;
 
 /**
  * @defgroup locale-languages-negotiation Language negotiation options
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index f23eb0d4dff292089445e74eff07ed02e6708708..13b4c7d416f683c4e7e430c6876f52fcb8a72a14 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -83,42 +83,42 @@
 /**
  * Internal menu flag -- menu item is the root of the menu tree.
  */
-define('MENU_IS_ROOT', 0x0001);
+const MENU_IS_ROOT = 0x0001;
 
 /**
  * Internal menu flag -- menu item is visible in the menu tree.
  */
-define('MENU_VISIBLE_IN_TREE', 0x0002);
+const MENU_VISIBLE_IN_TREE = 0x0002;
 
 /**
  * Internal menu flag -- menu item is visible in the breadcrumb.
  */
-define('MENU_VISIBLE_IN_BREADCRUMB', 0x0004);
+const MENU_VISIBLE_IN_BREADCRUMB = 0x0004;
 
 /**
  * Internal menu flag -- menu item links back to its parent.
  */
-define('MENU_LINKS_TO_PARENT', 0x0008);
+const MENU_LINKS_TO_PARENT = 0x0008;
 
 /**
  * Internal menu flag -- menu item can be modified by administrator.
  */
-define('MENU_MODIFIED_BY_ADMIN', 0x0020);
+const MENU_MODIFIED_BY_ADMIN = 0x0020;
 
 /**
  * Internal menu flag -- menu item was created by administrator.
  */
-define('MENU_CREATED_BY_ADMIN', 0x0040);
+const MENU_CREATED_BY_ADMIN = 0x0040;
 
 /**
  * Internal menu flag -- menu item is a local task.
  */
-define('MENU_IS_LOCAL_TASK', 0x0080);
+const MENU_IS_LOCAL_TASK = 0x0080;
 
 /**
  * Internal menu flag -- menu item is a local action.
  */
-define('MENU_IS_LOCAL_ACTION', 0x0100);
+const MENU_IS_LOCAL_ACTION = 0x0100;
 
 /**
  * @} End of "Menu flags".
@@ -148,7 +148,7 @@
  * Callbacks simply register a path so that the correct function is fired
  * when the URL is accessed. They do not appear in menus or breadcrumbs.
  */
-define('MENU_CALLBACK', 0x0000);
+const MENU_CALLBACK = 0x0000;
 
 /**
  * Menu type -- A normal menu item, hidden until enabled by an administrator.
@@ -201,17 +201,17 @@
  * This flag may be used for local tasks like "Delete", so custom modules and
  * themes can alter the default context and expose the task by altering menu.
  */
-define('MENU_CONTEXT_NONE', 0x0000);
+const MENU_CONTEXT_NONE = 0x0000;
 
 /**
  * Internal menu flag: Local task should be displayed in page context.
  */
-define('MENU_CONTEXT_PAGE', 0x0001);
+const MENU_CONTEXT_PAGE = 0x0001;
 
 /**
  * Internal menu flag: Local task should be displayed inline.
  */
-define('MENU_CONTEXT_INLINE', 0x0002);
+const MENU_CONTEXT_INLINE = 0x0002;
 
 /**
  * @} End of "Menu context types".
@@ -226,27 +226,27 @@
 /**
  * Internal menu status code -- Menu item was found.
  */
-define('MENU_FOUND', 1);
+const MENU_FOUND = 1;
 
 /**
  * Internal menu status code -- Menu item was not found.
  */
-define('MENU_NOT_FOUND', 2);
+const MENU_NOT_FOUND = 2;
 
 /**
  * Internal menu status code -- Menu item access is denied.
  */
-define('MENU_ACCESS_DENIED', 3);
+const MENU_ACCESS_DENIED = 3;
 
 /**
  * Internal menu status code -- Menu item inaccessible because site is offline.
  */
-define('MENU_SITE_OFFLINE', 4);
+const MENU_SITE_OFFLINE = 4;
 
 /**
  * Internal menu status code -- Everything is working fine.
  */
-define('MENU_SITE_ONLINE', 5);
+const MENU_SITE_ONLINE = 5;
 
 /**
  * @} End of "Menu status codes".
@@ -261,13 +261,13 @@
  /**
  * The maximum number of path elements for a menu callback
  */
-define('MENU_MAX_PARTS', 9);
+const MENU_MAX_PARTS = 9;
 
 
 /**
  * The maximum depth of a menu links tree - matches the number of p columns.
  */
-define('MENU_MAX_DEPTH', 9);
+const MENU_MAX_DEPTH = 9;
 
 
 /**
diff --git a/core/includes/password.inc b/core/includes/password.inc
index a4b963362947b19130824641a25e1694cf8451df..9020fbbcab91d57a801344f86e610248ec2efd9f 100644
--- a/core/includes/password.inc
+++ b/core/includes/password.inc
@@ -18,22 +18,22 @@
  * increase by 1 every Drupal version in order to counteract increases in the
  * speed and power of computers available to crack the hashes.
  */
-define('DRUPAL_HASH_COUNT', 16);
+const DRUPAL_HASH_COUNT = 16;
 
 /**
  * The minimum allowed log2 number of iterations for password stretching.
  */
-define('DRUPAL_MIN_HASH_COUNT', 7);
+const DRUPAL_MIN_HASH_COUNT = 7;
 
 /**
  * The maximum allowed log2 number of iterations for password stretching.
  */
-define('DRUPAL_MAX_HASH_COUNT', 30);
+const DRUPAL_MAX_HASH_COUNT = 30;
 
 /**
  * The expected (and maximum) number of characters in a hashed password.
  */
-define('DRUPAL_HASH_LENGTH', 55);
+const DRUPAL_HASH_LENGTH = 55;
 
 /**
  * Returns a string for mapping an int to the corresponding base 64 character.
diff --git a/core/includes/stream_wrappers.inc b/core/includes/stream_wrappers.inc
index 650d94db1ea75c72f01ad70439eeccc2930f85b8..52502f5fe6663a3d8bc022c7dd179e283af233c1 100644
--- a/core/includes/stream_wrappers.inc
+++ b/core/includes/stream_wrappers.inc
@@ -29,27 +29,27 @@
 /**
  * Stream wrapper bit flag -- a filter that matches all wrappers.
  */
-define('STREAM_WRAPPERS_ALL', 0x0000);
+const STREAM_WRAPPERS_ALL = 0x0000;
 
 /**
  * Stream wrapper bit flag -- refers to a local file system location.
  */
-define('STREAM_WRAPPERS_LOCAL', 0x0001);
+const STREAM_WRAPPERS_LOCAL = 0x0001;
 
 /**
  * Stream wrapper bit flag -- wrapper is readable (almost always true).
  */
-define('STREAM_WRAPPERS_READ', 0x0004);
+const STREAM_WRAPPERS_READ = 0x0004;
 
 /**
  * Stream wrapper bit flag -- wrapper is writeable.
  */
-define('STREAM_WRAPPERS_WRITE', 0x0008);
+const STREAM_WRAPPERS_WRITE = 0x0008;
 
 /**
  * Stream wrapper bit flag -- exposed in the UI and potentially web accessible.
  */
-define('STREAM_WRAPPERS_VISIBLE', 0x0010);
+const STREAM_WRAPPERS_VISIBLE = 0x0010;
 
 /**
  * Composite stream wrapper bit flags that are usually used as the types.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 06c4b79f097260802d6a394cafe0a459a30058b9..902907ade24815371c142a8da6ef05f7edbe1e09 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -18,17 +18,17 @@
 /**
  * Mark content as read.
  */
-define('MARK_READ', 0);
+const MARK_READ = 0;
 
 /**
  * Mark content as being new.
  */
-define('MARK_NEW', 1);
+const MARK_NEW = 1;
 
 /**
  * Mark content as being updated.
  */
-define('MARK_UPDATED', 2);
+const MARK_UPDATED = 2;
 
 /**
  * @} End of "Content markers".
diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc
index 9dde2ca70cca8fc8f1710b9ee88cd0ca01fc2a80..f7594888c48e557af8c08602e49154b51cc464a2 100644
--- a/core/includes/unicode.inc
+++ b/core/includes/unicode.inc
@@ -3,18 +3,18 @@
 /**
  * Indicates an error during check for PHP unicode support.
  */
-define('UNICODE_ERROR', -1);
+const UNICODE_ERROR = -1;
 
 /**
  * Indicates that standard PHP (emulated) unicode support is being used.
  */
-define('UNICODE_SINGLEBYTE', 0);
+const UNICODE_SINGLEBYTE = 0;
 
 /**
  * Indicates that full unicode support with the PHP mbstring extension is being
  * used.
  */
-define('UNICODE_MULTIBYTE', 1);
+const UNICODE_MULTIBYTE = 1;
 
 /**
  * Matches Unicode characters that are word boundaries.
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 5c67611937054282e32228dca055c907507b253c..289d27ad7c4ac4de44b9aca0b1f747e6ac6c2fb7 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -16,7 +16,7 @@
  * check the Drupal 7 version once the update process has begun, so instead
  * we check the schema version of system.module in the system table.
  */
-define('REQUIRED_D7_SCHEMA_VERSION', '7069');
+const REQUIRED_D7_SCHEMA_VERSION = '7069';
 
 /**
  * Disable any items in the {system} table that are not core compatible.
diff --git a/core/install.php b/core/install.php
index 01f54b76234706e613390757e79a70fb76040e6f..a63ab29cadc044951d59557597838b8122e3efdc 100644
--- a/core/install.php
+++ b/core/install.php
@@ -16,7 +16,7 @@
 /**
  * Global flag to indicate that site is in installation mode.
  */
-define('MAINTENANCE_MODE', 'install');
+const MAINTENANCE_MODE = 'install';
 
 // Exit early if running an incompatible PHP version to avoid fatal errors.
 // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index 72e31c3d6bbe3bca025504113369bb6048530460..bd0c6c1515013951456d5eaf8dbefbfb5d88ae49 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -8,7 +8,7 @@
 /**
  * Denotes that a feed's items should never expire.
  */
-define('AGGREGATOR_CLEAR_NEVER', 0);
+const AGGREGATOR_CLEAR_NEVER = 0;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index b6ea37351f6ff144836d59b7f8f569e851f1d148..55b0b40ab9337d380f30bf9d8d564fbe9ab25f68 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -8,37 +8,37 @@
 /**
  * Denotes that a block is not enabled in any region and should not be shown.
  */
-define('BLOCK_REGION_NONE', -1);
+const BLOCK_REGION_NONE = -1;
 
 /**
  * Users cannot control whether or not they see this block.
  */
-define('BLOCK_CUSTOM_FIXED', 0);
+const BLOCK_CUSTOM_FIXED = 0;
 
 /**
  *  Shows this block by default, but lets individual users hide it.
  */
-define('BLOCK_CUSTOM_ENABLED', 1);
+const BLOCK_CUSTOM_ENABLED = 1;
 
 /**
  * Hides this block by default but lets individual users show it.
  */
-define('BLOCK_CUSTOM_DISABLED', 2);
+const BLOCK_CUSTOM_DISABLED = 2;
 
 /**
  * Shows this block on every page except the listed pages.
  */
-define('BLOCK_VISIBILITY_NOTLISTED', 0);
+const BLOCK_VISIBILITY_NOTLISTED = 0;
 
 /**
  * Shows this block on only the listed pages.
  */
-define('BLOCK_VISIBILITY_LISTED', 1);
+const BLOCK_VISIBILITY_LISTED = 1;
 
 /**
  * Shows this block if the associated PHP code returns TRUE.
  */
-define('BLOCK_VISIBILITY_PHP', 2);
+const BLOCK_VISIBILITY_PHP = 2;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index ae9278ce98f74040331839d763ecec5fd0fb8cdf..cf499236ffd5af167675e1a138e923ab386274ce 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -12,62 +12,62 @@
 /**
  * Comment is awaiting approval.
  */
-define('COMMENT_NOT_PUBLISHED', 0);
+const COMMENT_NOT_PUBLISHED = 0;
 
 /**
  * Comment is published.
  */
-define('COMMENT_PUBLISHED', 1);
+const COMMENT_PUBLISHED = 1;
 
 /**
  * Comments are displayed in a flat list - expanded.
  */
-define('COMMENT_MODE_FLAT', 0);
+const COMMENT_MODE_FLAT = 0;
 
 /**
  * Comments are displayed as a threaded list - expanded.
  */
-define('COMMENT_MODE_THREADED', 1);
+const COMMENT_MODE_THREADED = 1;
 
 /**
  * Anonymous posters cannot enter their contact information.
  */
-define('COMMENT_ANONYMOUS_MAYNOT_CONTACT', 0);
+const COMMENT_ANONYMOUS_MAYNOT_CONTACT = 0;
 
 /**
  * Anonymous posters may leave their contact information.
  */
-define('COMMENT_ANONYMOUS_MAY_CONTACT', 1);
+const COMMENT_ANONYMOUS_MAY_CONTACT = 1;
 
 /**
  * Anonymous posters are required to leave their contact information.
  */
-define('COMMENT_ANONYMOUS_MUST_CONTACT', 2);
+const COMMENT_ANONYMOUS_MUST_CONTACT = 2;
 
 /**
  * Comment form should be displayed on a separate page.
  */
-define('COMMENT_FORM_SEPARATE_PAGE', 0);
+const COMMENT_FORM_SEPARATE_PAGE = 0;
 
 /**
  * Comment form should be shown below post or list of comments.
  */
-define('COMMENT_FORM_BELOW', 1);
+const COMMENT_FORM_BELOW = 1;
 
 /**
  * Comments for this node are hidden.
  */
-define('COMMENT_NODE_HIDDEN', 0);
+const COMMENT_NODE_HIDDEN = 0;
 
 /**
  * Comments for this node are closed.
  */
-define('COMMENT_NODE_CLOSED', 1);
+const COMMENT_NODE_CLOSED = 1;
 
 /**
  * Comments for this node are open.
  */
-define('COMMENT_NODE_OPEN', 2);
+const COMMENT_NODE_OPEN = 2;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc
index 3f5520a57f5d05ba45c28934d8c5849522edb501..22aa31c9237683b9cd3c981af3e6fb96beeef2af 100644
--- a/core/modules/field/field.attach.inc
+++ b/core/modules/field/field.attach.inc
@@ -52,14 +52,14 @@ function __construct($errors) {
  * This is used in hook_field_storage_write when updating an
  * existing entity.
  */
-define('FIELD_STORAGE_UPDATE', 'update');
+const FIELD_STORAGE_UPDATE = 'update';
 
 /**
  * Argument for an insert operation.
  *
  * This is used in hook_field_storage_write when inserting a new entity.
  */
-define('FIELD_STORAGE_INSERT', 'insert');
+const FIELD_STORAGE_INSERT = 'insert';
 
 /**
  * @} End of "defgroup field_storage"
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 70b17f52465b0bc4d9a587b14c62d968fe29bb9c..b52fe0da9de6e725e15bb859c7eef4a0093932b5 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -263,14 +263,14 @@ class FieldException extends Exception {}
 /**
  * Value for field API indicating a field accepts an unlimited number of values.
  */
-define('FIELD_CARDINALITY_UNLIMITED', -1);
+const FIELD_CARDINALITY_UNLIMITED = -1;
 
 /**
  * Value for field API indicating a widget doesn't accept default values.
  *
  * @see hook_field_widget_info()
  */
-define('FIELD_BEHAVIOR_NONE', 0x0001);
+const FIELD_BEHAVIOR_NONE = 0x0001;
 
 /**
  * Value for field API concerning widget default and multiple value settings.
@@ -282,26 +282,26 @@ class FieldException extends Exception {}
  * input of one single field value, indicates that the widget will be repeated
  * for each value input.
  */
-define('FIELD_BEHAVIOR_DEFAULT', 0x0002);
+const FIELD_BEHAVIOR_DEFAULT = 0x0002;
 
 /**
  * Value for field API indicating a widget can receive several field values.
  *
  * @see hook_field_widget_info()
  */
-define('FIELD_BEHAVIOR_CUSTOM', 0x0004);
+const FIELD_BEHAVIOR_CUSTOM = 0x0004;
 
 /**
  * Age argument for loading the most recent version of an entity's
  * field data with field_attach_load().
  */
-define('FIELD_LOAD_CURRENT', 'FIELD_LOAD_CURRENT');
+const FIELD_LOAD_CURRENT = 'FIELD_LOAD_CURRENT';
 
 /**
  * Age argument for loading the version of an entity's field data
  * specified in the entity with field_attach_load().
  */
-define('FIELD_LOAD_REVISION', 'FIELD_LOAD_REVISION');
+const FIELD_LOAD_REVISION = 'FIELD_LOAD_REVISION';
 
 /**
  * Exception class thrown by hook_field_update_forbid().
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 5cdd9c52bd34a8bfe2bfdca4b2d2b08e91df749e..ccc8cd1a0f73e9efbdee3abdffd5b2ece53f7638 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -8,17 +8,17 @@
 /**
  * Image style constant for user presets in the database.
  */
-define('IMAGE_STORAGE_NORMAL', 1);
+const IMAGE_STORAGE_NORMAL = 1;
 
 /**
  * Image style constant for user presets that override module-defined presets.
  */
-define('IMAGE_STORAGE_OVERRIDE', 2);
+const IMAGE_STORAGE_OVERRIDE = 2;
 
 /**
  * Image style constant for module-defined presets in code.
  */
-define('IMAGE_STORAGE_DEFAULT', 4);
+const IMAGE_STORAGE_DEFAULT = 4;
 
 /**
  * Image style constant to represent an editable preset.
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index cd422561d914c503904eb37e0bfbe250f2026636..1b4cf9cafd01c093b29a217a93a8ce3bc67274a7 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -15,7 +15,7 @@
  * Maximum length of menu name as entered by the user. Database length is 32
  * and we add a menu- prefix.
  */
-define('MENU_MAX_MENU_NAME_LENGTH_UI', 27);
+const MENU_MAX_MENU_NAME_LENGTH_UI = 27;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 6def1620be3e25b8712d100f2643682ea29feaa2..349cde6e6ca77625b139fdf8354a71e688d3164e 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -11,32 +11,32 @@
 /**
  * Denotes that the node is not published.
  */
-define('NODE_NOT_PUBLISHED', 0);
+const NODE_NOT_PUBLISHED = 0;
 
 /**
  * Denotes that the node is published.
  */
-define('NODE_PUBLISHED', 1);
+const NODE_PUBLISHED = 1;
 
 /**
  * Denotes that the node is not promoted to the front page.
  */
-define('NODE_NOT_PROMOTED', 0);
+const NODE_NOT_PROMOTED = 0;
 
 /**
  * Denotes that the node is promoted to the front page.
  */
-define('NODE_PROMOTED', 1);
+const NODE_PROMOTED = 1;
 
 /**
  * Denotes that the node is not sticky at the top of the page.
  */
-define('NODE_NOT_STICKY', 0);
+const NODE_NOT_STICKY = 0;
 
 /**
  * Denotes that the node is sticky at the top of the page.
  */
-define('NODE_STICKY', 1);
+const NODE_STICKY = 1;
 
 /**
  * Denotes the time cutoff for nodes marked as read.
@@ -53,7 +53,7 @@
  * Modules should return this value from hook_node_access() to allow access to a
  * node.
  */
-define('NODE_ACCESS_ALLOW', 'allow');
+const NODE_ACCESS_ALLOW = 'allow';
 
 /**
  * Denotes that access is denied for a node.
@@ -61,7 +61,7 @@
  * Modules should return this value from hook_node_access() to deny access to a
  * node.
  */
-define('NODE_ACCESS_DENY', 'deny');
+const NODE_ACCESS_DENY = 'deny';
 
 /**
  * Denotes that access is unaffected for a node.
@@ -69,7 +69,7 @@
  * Modules should return this value from hook_node_access() to indicate no
  * effect on node access.
  */
-define('NODE_ACCESS_IGNORE', NULL);
+const NODE_ACCESS_IGNORE = NULL;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/openid/openid.inc b/core/modules/openid/openid.inc
index 6945f34ed5a8a3a18de3cd7a1e0edf52c4fd9d3f..a0549ee4ef80b8ae64b9a6473fcc5bd48192f83b 100644
--- a/core/modules/openid/openid.inc
+++ b/core/modules/openid/openid.inc
@@ -22,52 +22,52 @@
 /**
  * Diffie-Hellman generator; used for Diffie-Hellman key exchange computations.
  */
-define('OPENID_DH_DEFAULT_GEN', '2');
+const OPENID_DH_DEFAULT_GEN = '2';
 
 /**
  * SHA-1 hash block size; used for Diffie-Hellman key exchange computations.
  */
-define('OPENID_SHA1_BLOCKSIZE', 64);
+const OPENID_SHA1_BLOCKSIZE = 64;
 
 /**
  * Random number generator; used for Diffie-Hellman key exchange computations.
  */
-define('OPENID_RAND_SOURCE', '/dev/urandom');
+const OPENID_RAND_SOURCE = '/dev/urandom';
 
 /**
  * OpenID Authentication 2.0 namespace URL.
  */
-define('OPENID_NS_2_0', 'http://specs.openid.net/auth/2.0');
+const OPENID_NS_2_0 = 'http://specs.openid.net/auth/2.0';
 
 /**
  * OpenID Authentication 1.1 namespace URL; used for backwards-compatibility.
  */
-define('OPENID_NS_1_1', 'http://openid.net/signon/1.1');
+const OPENID_NS_1_1 = 'http://openid.net/signon/1.1';
 
 /**
  * OpenID Authentication 1.0 namespace URL; used for backwards-compatibility.
  */
-define('OPENID_NS_1_0', 'http://openid.net/signon/1.0');
+const OPENID_NS_1_0 = 'http://openid.net/signon/1.0';
 
 /**
  * OpenID namespace used in Yadis documents.
  */
-define('OPENID_NS_OPENID', 'http://openid.net/xmlns/1.0');
+const OPENID_NS_OPENID = 'http://openid.net/xmlns/1.0';
 
 /**
  * OpenID Simple Registration extension.
  */
-define('OPENID_NS_SREG', 'http://openid.net/extensions/sreg/1.1');
+const OPENID_NS_SREG = 'http://openid.net/extensions/sreg/1.1';
 
 /**
  * OpenID Attribute Exchange extension.
  */
-define('OPENID_NS_AX', 'http://openid.net/srv/ax/1.0');
+const OPENID_NS_AX = 'http://openid.net/srv/ax/1.0';
 
 /**
  * Extensible Resource Descriptor documents.
  */
-define('OPENID_NS_XRD', 'xri://$xrd*($v*2.0)');
+const OPENID_NS_XRD = 'xri://$xrd*($v*2.0)';
 
 /**
  * Performs an HTTP 302 redirect (for the 1.x protocol).
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 4eea4177b558a11244f8e3a361d279ef0f73fae3..b2a8457d0d544c1ffeacd1f79610df914cdc14b0 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -71,7 +71,7 @@ function rdf_help($path, $arg) {
  * Each bundle will inherit the default mappings defined for the entity type
  * unless the bundle defines its own specific mappings.
  */
-define('RDF_DEFAULT_BUNDLE', '');
+const RDF_DEFAULT_BUNDLE = '';
 
 /**
  * Implements hook_rdf_namespaces().
diff --git a/core/modules/search/search.test b/core/modules/search/search.test
index f121abd3321463b056ec405ff82fff7e5687bb08..a04433edf8763a0992d2f68a1f73ae50917c8902 100644
--- a/core/modules/search/search.test
+++ b/core/modules/search/search.test
@@ -7,9 +7,9 @@
 
 // The search index can contain different types of content. Typically the type is 'node'.
 // Here we test with _test_ and _test2_ as the type.
-define('SEARCH_TYPE', '_test_');
-define('SEARCH_TYPE_2', '_test2_');
-define('SEARCH_TYPE_JPN', '_test3_');
+const SEARCH_TYPE = '_test_';
+const SEARCH_TYPE_2 = '_test2_';
+const SEARCH_TYPE_JPN = '_test3_';
 
 class SearchMatchTestCase extends DrupalWebTestCase {
   public static function getInfo() {
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index f8ddcc24facd257abec4eb3cc5cd54e67ea7db6c..34177bb67e1751c06c7ebc34cf1795854add85ae 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -11,7 +11,7 @@
  * This set will be displayed to any user that does not have another set
  * assigned, unless overridden by a hook_shortcut_default_set() implementation.
  */
-define('SHORTCUT_DEFAULT_SET_NAME', 'shortcut-set-1');
+const SHORTCUT_DEFAULT_SET_NAME = 'shortcut-set-1';
 
 /**
  * Implements hook_help().
diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install
index ea847f4eaefef25e2b13d31be2c95fe100a57626..96cc0112f7f9b695bfd93a94d1bf21580022673b 100644
--- a/core/modules/simpletest/simpletest.install
+++ b/core/modules/simpletest/simpletest.install
@@ -8,7 +8,7 @@
 /**
  * Minimum value of PHP memory_limit for SimpleTest.
  */
-define('SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT', '64M');
+const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '64M';
 
 /**
  * Implements hook_requirements().
diff --git a/core/modules/simpletest/tests/file_test.module b/core/modules/simpletest/tests/file_test.module
index b3c43e071bb4ae067f10a69d8bc860a43ae40638..bfeee56b2230ff61a2861412ce00149087707e82 100644
--- a/core/modules/simpletest/tests/file_test.module
+++ b/core/modules/simpletest/tests/file_test.module
@@ -9,8 +9,8 @@
  */
 
 
-define('FILE_URL_TEST_CDN_1', 'http://cdn1.example.com');
-define('FILE_URL_TEST_CDN_2', 'http://cdn2.example.com');
+const FILE_URL_TEST_CDN_1 = 'http://cdn1.example.com';
+const FILE_URL_TEST_CDN_2 = 'http://cdn2.example.com';
 
 
 /**
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index f16b73ffd23367a06d0d65df69b1585ccebb1ecd..77d6ebfa46ee788c9ff66559c6dadf8b9d201baa 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -8,56 +8,56 @@
 /**
  * Maximum age of temporary files in seconds.
  */
-define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600);
+const DRUPAL_MAXIMUM_TEMP_FILE_AGE = 21600;
 
 /**
  * Default interval for automatic cron executions in seconds.
  */
-define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800);
+const DRUPAL_CRON_DEFAULT_THRESHOLD = 10800;
 
 /**
  * New users will be set to the default time zone at registration.
  */
-define('DRUPAL_USER_TIMEZONE_DEFAULT', 0);
+const DRUPAL_USER_TIMEZONE_DEFAULT = 0;
 
 /**
  * New users will get an empty time zone at registration.
  */
-define('DRUPAL_USER_TIMEZONE_EMPTY', 1);
+const DRUPAL_USER_TIMEZONE_EMPTY = 1;
 
 /**
  * New users will select their own timezone at registration.
  */
-define('DRUPAL_USER_TIMEZONE_SELECT', 2);
+const DRUPAL_USER_TIMEZONE_SELECT = 2;
 
  /**
  * Disabled option on forms and settings
  */
-define('DRUPAL_DISABLED', 0);
+const DRUPAL_DISABLED = 0;
 
 /**
  * Optional option on forms and settings
  */
-define('DRUPAL_OPTIONAL', 1);
+const DRUPAL_OPTIONAL = 1;
 
 /**
  * Required option on forms and settings
  */
-define('DRUPAL_REQUIRED', 2);
+const DRUPAL_REQUIRED = 2;
 
 /**
  * Return only visible regions.
  *
  * @see system_region_list()
  */
-define('REGIONS_VISIBLE', 'visible');
+const REGIONS_VISIBLE = 'visible';
 
 /**
  * Return all regions.
  *
  * @see system_region_list()
  */
-define('REGIONS_ALL', 'all');
+const REGIONS_ALL = 'all';
 
 /**
  * Implements hook_help().
diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module
index 7d47a6d766b2f3de131165f953a32860f5a10871..9f6a6d5be09187e5ef1a4e276d36964c3f0be3a4 100644
--- a/core/modules/translation/translation.module
+++ b/core/modules/translation/translation.module
@@ -22,7 +22,7 @@
 /**
  * Identifies a content type which has translation support enabled.
  */
-define('TRANSLATION_ENABLED', 2);
+const TRANSLATION_ENABLED = 2;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 6da47c0570625f8452def75f2f2cb684f815abf3..5612b073d9d3ed2447ca3e2e3f36ec4b8f4c8094 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -11,64 +11,64 @@
 /**
  * URL to check for updates, if a given project doesn't define its own.
  */
-define('UPDATE_DEFAULT_URL', 'http://updates.drupal.org/release-history');
+const UPDATE_DEFAULT_URL = 'http://updates.drupal.org/release-history';
 
 // These are internally used constants for this code, do not modify.
 
 /**
  * Project is missing security update(s).
  */
-define('UPDATE_NOT_SECURE', 1);
+const UPDATE_NOT_SECURE = 1;
 
 /**
  * Current release has been unpublished and is no longer available.
  */
-define('UPDATE_REVOKED', 2);
+const UPDATE_REVOKED = 2;
 
 /**
  * Current release is no longer supported by the project maintainer.
  */
-define('UPDATE_NOT_SUPPORTED', 3);
+const UPDATE_NOT_SUPPORTED = 3;
 
 /**
  * Project has a new release available, but it is not a security release.
  */
-define('UPDATE_NOT_CURRENT', 4);
+const UPDATE_NOT_CURRENT = 4;
 
 /**
  * Project is up to date.
  */
-define('UPDATE_CURRENT', 5);
+const UPDATE_CURRENT = 5;
 
 /**
  * Project's status cannot be checked.
  */
-define('UPDATE_NOT_CHECKED', -1);
+const UPDATE_NOT_CHECKED = -1;
 
 /**
  * No available update data was found for project.
  */
-define('UPDATE_UNKNOWN', -2);
+const UPDATE_UNKNOWN = -2;
 
 /**
  * There was a failure fetching available update data for this project.
  */
-define('UPDATE_NOT_FETCHED', -3);
+const UPDATE_NOT_FETCHED = -3;
 
 /**
  * We need to (re)fetch available update data for this project.
  */
-define('UPDATE_FETCH_PENDING', -4);
+const UPDATE_FETCH_PENDING = -4;
 
 /**
  * Maximum number of attempts to fetch available update data from a given host.
  */
-define('UPDATE_MAX_FETCH_ATTEMPTS', 2);
+const UPDATE_MAX_FETCH_ATTEMPTS = 2;
 
 /**
  * Maximum number of seconds to try fetching available update data at a time.
  */
-define('UPDATE_MAX_FETCH_TIME', 5);
+const UPDATE_MAX_FETCH_TIME = 5;
 
 /**
  * Implements hook_help().
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 6f1bc3c45a6f98ce3b1360c190726fd8ca824212..eb2f521c41750aee503fc440467912e6b4475ff0 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -8,28 +8,28 @@
 /**
  * Maximum length of username text field.
  */
-define('USERNAME_MAX_LENGTH', 60);
+const USERNAME_MAX_LENGTH = 60;
 
 /**
  * Maximum length of user e-mail text field.
  */
-define('EMAIL_MAX_LENGTH', 254);
+const EMAIL_MAX_LENGTH = 254;
 
 /**
  * Only administrators can create user accounts.
  */
-define('USER_REGISTER_ADMINISTRATORS_ONLY', 0);
+const USER_REGISTER_ADMINISTRATORS_ONLY = 0;
 
 /**
  * Visitors can create their own accounts.
  */
-define('USER_REGISTER_VISITORS', 1);
+const USER_REGISTER_VISITORS = 1;
 
 /**
  * Visitors can create accounts, but they don't become active without
  * administrative approval.
  */
-define('USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL', 2);
+const USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL = 2;
 
 /**
  * Implement hook_help().
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index f74766041e0c43c23a02d6067613ab23d14b0ae8..993df74f7b38d681eef8dabba00384d6a2d49ea6 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -4,9 +4,9 @@
  * This script runs Drupal tests from command line.
  */
 
-define('SIMPLETEST_SCRIPT_COLOR_PASS', 32); // Green.
-define('SIMPLETEST_SCRIPT_COLOR_FAIL', 31); // Red.
-define('SIMPLETEST_SCRIPT_COLOR_EXCEPTION', 33); // Brown.
+const SIMPLETEST_SCRIPT_COLOR_PASS = 32; // Green.
+const SIMPLETEST_SCRIPT_COLOR_FAIL = 31; // Red.
+const SIMPLETEST_SCRIPT_COLOR_EXCEPTION = 33; // Brown.
 
 // Set defaults and get overrides.
 list($args, $count) = simpletest_script_parse_args();
diff --git a/core/update.php b/core/update.php
index d1a094050fc0c4cf1ac23fbd6608cda5069b7bec..dd338a209f2156660529f4bf5e586432f9594695 100644
--- a/core/update.php
+++ b/core/update.php
@@ -28,7 +28,7 @@
  * When this flag is set, various operations do not take place, such as invoking
  * hook_init() and hook_exit(), css/js preprocessing, and translation.
  */
-define('MAINTENANCE_MODE', 'update');
+const MAINTENANCE_MODE = 'update';
 
 function update_selection_page() {
   drupal_set_title('Drupal database update');