в dev окружении скрипты валятся с ошибкой
There are a few pitfalls to be aware of. Before PHP version 5.1.0, instanceof would call __autoload() if the class name did not exist. In addition, if the class was not loaded, a fatal error would occur. This can be worked around by using a dynamic class reference, or a string variable containing the class name:
<span class="btn btn_small btn_green"><?= Yii::t('app', 'Add to list'); ?></span>
<?=\yii\bootstrap\Button::widget([
'label' => Yii::t('app', 'Add to list'),
'options' => ['class' => 'btn btn_small btn_green'],
]);?>
var foo = bar();
var bar = function () {
return 'Broken!';
};
var foo = bar();
function bar () {
return 'It Works!';
}