what's the difference between exit and Yii::app()->end();




if (Yii::app()->request->isAjaxRequest)   

 {        	

 	echo CJSON::encode(array( 

	     'status'=>'failure', 

     	'div'=>$this->renderPartial('_form', array('model'=>$model), true)));  

 	exit;   // can I replace exit with Yii::app()->end()? 	

  }	

 else  

 	$this->render('create',array('model'=>$model,));   

  }




Can I replace


exit

here with


Yii::app()->end()

? why?

Thank you!

This is the difference (click show).

/Tommy


public function end($status=0, $exit=true)

{

    if($this->hasEventHandler('onEndRequest'))

        $this->onEndRequest(new CEvent($this));

    if($exit)

        exit($status);

}

Thanks!