first draft php code with yii same code