Universal PHP-factory