Standalone PHP 5.2 Inflector backport from Yii 2.0