Translations:Manual:MWNamespace.php/5/en

Returns an array of the namespaces (by integer id) that exist on the wiki. Used primarily by the api in help documentation. This function calls  without using the rebuild option and it then excludes the negative number namespaces, e.g. -1 (special page).