Here are quizzes on magical numbers related with Drupal 7.
How many numbers do you know of them? If you already know all of them, you're an awesome Drupal master certified by hgoto (me)! (But there's no certificate :) )
The default session expiration time. After 21 days (actually 2,000,000 seconds) since the session was created, user sessions expire.
The time limit for temporary files managed by Drupal. When the first cron runs after this time limit, temporary files are deleted.
The default max execution time limit for Drupal cron.
The max length of field machine names.
The days nodes are recognized as "New". In this duration, created nodes are marked "New" by node history function.
define('NODE_NEW_LIMIT', REQUEST_TIME - 30 * 24 * 60 * 60);
The max length of user names.
The max length of user email addresses.
The max length of menu item names.
The minimum memory size Drupal 7 can run.
The minimum memory size Drupal 7 tests with Simpletest can run.
The minimum PHP version Drupal 7 can run.
Max depth of menu tree (menu items tree).
The Number of Bootsrap phases. Drupal 7 has 8 phases.
define('DRUPAL_BOOTSTRAP_CONFIGURATION', 0); define('DRUPAL_BOOTSTRAP_PAGE_CACHE', 1); define('DRUPAL_BOOTSTRAP_DATABASE', 2); define('DRUPAL_BOOTSTRAP_VARIABLES', 3); define('DRUPAL_BOOTSTRAP_SESSION', 4); define('DRUPAL_BOOTSTRAP_PAGE_HEADER', 5); define('DRUPAL_BOOTSTRAP_LANGUAGE', 6); define('DRUPAL_BOOTSTRAP_FULL', 7);
The default password hash count. Drupal 7 uses hash on passwords 15 times. You can configure this value for security improvement or performance improvement. The minimum number is 7 and maximum number is 30.
define('DRUPAL_HASH_COUNT', 15); define('DRUPAL_MIN_HASH_COUNT', 7); define('DRUPAL_MAX_HASH_COUNT', 30); define('DRUPAL_HASH_LENGTH', 55);
GC probability for sessions. Drupal 7 uses the PHP garbage collection mechanism and sessions are cleared on 1 of 100 requests.
ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100);
[-100, 0, 100]
The default CSS/JS group weights.
define('JS_LIBRARY', -100); define('JS_DEFAULT', 0); define('JS_THEME', 100);
The number of languages Drupal provides by default.
The number of countries/regions Drupal provides by default.
That's all. How many of them did you know? I'm glad if you enjoyed it :)