[PHPEngine] refactored;