Began to learn the framework yii2 met a recording there

<?php $form = ActiveForm::begin(); ?>

 <?= $form->field($model, 'name') ?> <?= $form->field($model, 'email') ?> <div class="form-group"> <?= Html::submitButton('Отправить', ['class' => 'btn btn-primary']) ?> </div> 

<?php ActiveForm::end(); ?>

I'm interested in <?= How does it work?

I tried to search through Google , it does not accept such requests.

    1 answer 1

    This is an abbreviated echo entry. Record

     <?= $form->field($model, 'name') ?> 

    Is identical

     <?php echo $form->field($model, 'name') ?> 

    Prior to the museum version of PHP 5.4.0, this abbreviated syntax was available only with the short_open_tag option enabled. If now somewhere you will get warning that the record <?= Intolerable and advice not to do so - do not pay attention. Starting from 5.4.0, this recording option is always available and is allowed for use in the official PSR-1 standard.

    • That's it, everything is much easier than I thought. Thank. - Yura Petrov