Manual:Namespace constants

Built-in namespaces have Defines>Special:MyLanguage/Manual:Defines.php|constants defined for them.

For example, NS_MAIN is defined as 0 (the main article namespace).