Manual:Namespace constants/id

Built-in namespaces have constants defined for them. For example, NS_MAIN is defined as 0 (the main article namespace).