For one of my extensions i need a switch statement if the Joomla! Version is 3.x or 4. (in fact i have to call the Articles Model in different way for J4) - but how can i get the actual installed Joomla! Version by PHP (inside my helper)?

thanks for your help.


1 Answer 1


Use JVERSION constant. It holds the value returned by Joomla\CMS\Version::getShortVersion().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.