Simplify PHP version check

Opened against integration branch as requested in #2274
Merge pull request #2277 from morrisonlevi/patch-4

Simplify PHP version check