yii2 print model errors code example Example: yii2 print model header('Content-type: text/plain'); print_r($var); exit;