By xjm on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
In Drupal 8 and later, constants should be defined using the const PHP language keyword (instead of define()), because it is better for performance:
/**
* Minimum value of PHP memory_limit for SimpleTest.
*/
const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '64M';
Note that const does not work with PHP expressions. define() should be used when defining a constant conditionally or with a non-literal value:
if (!defined('MAINTENANCE_MODE')) {
define('MAINTENANCE_MODE', 'error');
}
Impacts:
Module developers