Often there is code that contains the opening and closing of php tags on each line. For example:

<?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'auth_key')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'password_hash')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'password_reset_token')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'password_reset_code')->textInput(['maxlength' => true]) ?> 
  1. Why in a regular php file constantly open and close <? Php?>?
  2. Does this design affect the speed of execution of the file?
  • Open and close to alternate code php and html - KAGG Design
  • so the fact of the matter is that the code pkhp goes uninterruptedly, as in this example - Oughtem
  • It happens that just copying from other files. Maybe they just deleted the html between the lines. In short, do not bother about this topic - KAGG Design

1 answer 1

<?= ... ?> and <?php ... ?> not the same, because the first is equivalent to <?php echo ... ?>

This does not affect the speed of execution.