PhpClass refactored