跳转到内容
PHP Ecosystem
Explore

Usage examples

此内容尚不支持你的语言。

Each section shows one use case with one php block, written as code that runs in a view and echoes its output. The documentation site can render each block as a live demo, so the rendered output is not copied into this page.

Describe what the example shows.

use yii\template\Example;
$example = new Example();
echo $example->getExample(true) ? 'Legacy mode' : 'Default mode';

Back to documentation