Have you ever been in that situation where you have CLI access to a wordpress site but not through the GUI? I had that experience recently and wanted to know which version of wordpress the person was using. Mainly, I wanted to see if they were keeping things up to date.
So with this handy one liner I found scouring through the web, you can do exactly that.
$wp_version = '4.1.1';