Manual talk:$wgVersion

Hi, is there any way to get the current Mediawiki version through a PHP function, before $wgVersion that comes with MW 1.20 ? --Varlin (talk) 00:03, 30 December 2012 (UTC)


 * I think you didn't look at the page closely enough. It says that this configuration variable was introduced in MediaWiki 1.2.0, which is ancient history (it was released in March 2004; see Wikipedia's "MediaWiki version history" article for more info); 1.20 is the most recent stable version, and obviously 20 > 2. --Jack Phoenix (Contact) 00:54, 30 December 2012 (UTC)


 * Oops... Ok, but in this case,  should do the job, shouldn't it ? When I test it it displays nothing. --Varlin (talk) 01:02, 30 December 2012 (UTC)


 * It is a global variable, you need to declare it as such.  should work in most normal cases (though really, you shouldn't be using   outside skin files) &mdash; by normal I mean if you're working inside MediaWiki (such as writing an extension or hacking core or somesuch). If you want a third-party application to get the version number, then you most likely need to include   in your application, then global $wgVersion and finally output it, but I'm not sure if that would work, including core MediaWiki files in third-party apps is somewhat convoluted. --Jack Phoenix (Contact) 01:05, 30 December 2012 (UTC)