From 0180949b353a3c6e8620027af51d0efd06d840e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=9C=E5=B0=8F=E9=A2=9C?= <806639152@qq.com> Date: Sat, 8 Sep 2018 16:23:43 +0800 Subject: [PATCH] Example code error if() Syntax error --- docs/guide-zh-CN/yii2-redis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-zh-CN/yii2-redis.md b/docs/guide-zh-CN/yii2-redis.md index 04a3b0b38b..9f8c0257db 100644 --- a/docs/guide-zh-CN/yii2-redis.md +++ b/docs/guide-zh-CN/yii2-redis.md @@ -54,7 +54,7 @@ $redis = Yii::$app->redis; // 判断 key 为 username 的是否有值,有则打印,没有则赋值 $key = 'username'; -if ($val = $redis->get($key);) { +if ($val = $redis->get($key)) { var_dump($val); } else { $redis->set($key, 'marko');