Friendly XenForo Version ID


Well-known member
I'm creating a monitoring script for my sites, and as part of that I'm displaying a value for the XF version in a PHP script.

I've found that I can echo XenForo_Application::$versionId, but I get an unfriendly version string: "1020270". Is there a way I can find out the friendly Version ID? i.e. 1.2.2

Chris D

XenForo developer
Staff member
A bit primitive and not totally correct and would only work for stable versions:

str_replace('0', '.', substr(XenForo_Application::$versionId, 0, 4));