Use phpversion() function
Don't use self in anonymous functions
Fix wrong namespace scope in Legacy option converter