Reworked the changes for bug #64452
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Reworked the changes for bug #64452
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Reworked the changes for bug #64452
Merge branch 'PHP-5.5'

* PHP-5.5:
  Reworked the changes for bug #64452
Missed two occurances of Revision:
Skip locale dependent test if locale not available
Merge branch 'PHP-5.5'