From b850ac9a675e05bb0ef0ca83d0bddf9ac691afbd Mon Sep 17 00:00:00 2001 From: Michael-LiK Date: Fri, 12 Jul 2019 11:01:37 +0800 Subject: [PATCH 1/8] Set theme jekyll-theme-minimal --- _config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_config.yml b/_config.yml index 42ae65ec4..169d2b7ad 100644 --- a/_config.yml +++ b/_config.yml @@ -22,3 +22,5 @@ defaults: exclude: ['CNAME', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'pages/example.md', 'vendor'] future: true + +theme: jekyll-theme-minimal \ No newline at end of file From 818c16dce61be2b764754f744632ca584420939a Mon Sep 17 00:00:00 2001 From: Michael-LiK Date: Thu, 11 Jul 2019 20:24:17 +0800 Subject: [PATCH 2/8] dev --- pages/The-Basics.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index b13ceb23d..4e9ca44e4 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -4,12 +4,11 @@ title: The Basics sitemap: true --- -# The Basics +# 基础 -## Comparison operators +## 比较运算符 -Comparison operators are an often overlooked aspect of PHP, which can lead to many unexpected outcomes. One such -problem stems from strict comparisons (the comparison of booleans as integers). +比较运算符在PHP中经常容易被忽略,但是它常常会导致一些意想不到的输出结果。下面是一个常见的例子,在全等比较中,比较整型变量和布尔值。 {% highlight php %} Date: Thu, 11 Jul 2019 20:28:07 +0800 Subject: [PATCH 3/8] dev --- pages/The-Basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index 4e9ca44e4..e0d7db845 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -8,7 +8,7 @@ sitemap: true ## 比较运算符 -比较运算符在PHP中经常容易被忽略,但是它常常会导致一些意想不到的输出结果。下面是一个常见的例子,在全等比较中,比较整型变量和布尔值。 +比较运算符在PHP中经常容易被忽略,但是它常常会导致一些意想不到的输出结果。下面是一个常见的例子,在使用比较运算符等级,比较整型变量和布尔值。 {% highlight php %} Date: Thu, 11 Jul 2019 20:43:20 +0800 Subject: [PATCH 4/8] dev --- pages/The-Basics.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index e0d7db845..b35e710ad 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -30,17 +30,15 @@ if (strpos('testing', 'test') !== false) { // true, as strict comparison was } {% endhighlight %} -* [Comparison operators](http://php.net/language.operators.comparison) -* [Comparison table](http://php.net/types.comparisons) -* [Comparison cheatsheet](http://phpcheatsheets.com/index.php?page=compare) +* [比较运算符](http://php.net/language.operators.comparison) +* [PHP 类型比较表](http://php.net/types.comparisons) +* [比较运算符示例清单](http://phpcheatsheets.com/index.php?page=compare) -## Conditional statements +## 条件语句 -### If statements +### If 条件判断语句 -While using 'if/else' statements within a function or class method, there is a common misconception that 'else' must be used -in conjunction to declare potential outcomes. However if the outcome is to define the return value, 'else' is not -necessary as 'return' will end the function, causing 'else' to become moot. +当我们在函数或类方法中使用 'if/else' 条件判断语句时,存在一个常见的误解,else语句是必须使用的,以保证其他的执行结果得到声明。然而,如果我们的输出结果是去定义返回值,那么else语句就不是必须的,我们可以直接通过return进行返回,使用多余的else语句将变得没有意义。 {% highlight php %} Date: Fri, 12 Jul 2019 02:20:31 +0800 Subject: [PATCH 5/8] translate the Basics --- pages/The-Basics.md | 137 +++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 79 deletions(-) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index b35e710ad..7016e5d0b 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -8,7 +8,7 @@ sitemap: true ## 比较运算符 -比较运算符在PHP中经常容易被忽略,但是它常常会导致一些意想不到的输出结果。下面是一个常见的例子,在使用比较运算符等级,比较整型变量和布尔值。 +比较运算符在PHP中经常容易被忽略,但是它常常会导致一些意想不到的输出结果。下面是一个常见的例子,在使用比较运算符,比较整型变量和布尔值。 {% highlight php %} Date: Fri, 12 Jul 2019 02:24:42 +0800 Subject: [PATCH 6/8] translate the Basics --- _config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 169d2b7ad..892d57a0e 100644 --- a/_config.yml +++ b/_config.yml @@ -21,6 +21,4 @@ defaults: exclude: ['CNAME', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'pages/example.md', 'vendor'] -future: true - -theme: jekyll-theme-minimal \ No newline at end of file +future: true \ No newline at end of file From 2b7fe167fbdb95d82d8ae168f164ca202f0f58aa Mon Sep 17 00:00:00 2001 From: Michael-LiK Date: Fri, 12 Jul 2019 02:26:00 +0800 Subject: [PATCH 7/8] translate the Basics --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 892d57a0e..42ae65ec4 100644 --- a/_config.yml +++ b/_config.yml @@ -21,4 +21,4 @@ defaults: exclude: ['CNAME', 'CONTRIBUTING.md', 'LICENSE', 'README.md', 'pages/example.md', 'vendor'] -future: true \ No newline at end of file +future: true From 3baa8cfb4c006e20166183cd8c043aa64db6ffe4 Mon Sep 17 00:00:00 2001 From: Michael-LiK Date: Fri, 12 Jul 2019 02:26:34 +0800 Subject: [PATCH 8/8] translate the Basics --- pages/The-Basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/The-Basics.md b/pages/The-Basics.md index 7016e5d0b..3b123d4a4 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -387,4 +387,4 @@ echo $about; echo 'A very long string of text'; // uses 1MB memory {% endhighlight %} -* [性能提示](http://web.archive.org/web/20140625191431/https://developers.google.com/speed/articles/optimizing-php) +* [相关性能提示](http://web.archive.org/web/20140625191431/https://developers.google.com/speed/articles/optimizing-php)