mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-06 14:06:34 +02:00
Merge pull request #952 from petk/patch-https
Update links to https in Basics section
This commit is contained in:
@@ -31,9 +31,9 @@ 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)
|
||||
* [Comparison operators](https://www.php.net/language.operators.comparison)
|
||||
* [Comparison table](https://www.php.net/types.comparisons)
|
||||
* [Comparison cheatsheet](https://phpcheatsheets.com/index.php?page=compare)
|
||||
|
||||
## Conditional statements
|
||||
|
||||
@@ -73,7 +73,7 @@ function test($a)
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
* [If statements](http://php.net/control-structures.if)
|
||||
* [If statements](https://www.php.net/control-structures.if)
|
||||
|
||||
### Switch statements
|
||||
|
||||
@@ -106,7 +106,7 @@ function test($a)
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
* [Switch statements](http://php.net/control-structures.switch)
|
||||
* [Switch statements](https://www.php.net/control-structures.switch)
|
||||
* [PHP switch](http://phpswitch.com/)
|
||||
|
||||
## Global namespace
|
||||
@@ -131,8 +131,8 @@ function array()
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
* [Global space](http://php.net/language.namespaces.global)
|
||||
* [Global rules](http://php.net/userlandnaming.rules)
|
||||
* [Global space](https://www.php.net/language.namespaces.global)
|
||||
* [Global rules](https://www.php.net/userlandnaming.rules)
|
||||
|
||||
## Strings
|
||||
|
||||
@@ -156,7 +156,7 @@ $a = 'Multi-line example' // concatenation operator (.)
|
||||
. 'of what to do';
|
||||
{% endhighlight %}
|
||||
|
||||
* [String Operators](http://php.net/language.operators.string)
|
||||
* [String Operators](https://www.php.net/language.operators.string)
|
||||
|
||||
### String types
|
||||
|
||||
@@ -184,7 +184,7 @@ echo 'This is my string, look at how pretty it is.'; // no need to parse a si
|
||||
*/
|
||||
{% endhighlight %}
|
||||
|
||||
* [Single quote](http://php.net/language.types.string#language.types.string.syntax.single)
|
||||
* [Single quote](https://www.php.net/language.types.string#language.types.string.syntax.single)
|
||||
|
||||
#### Double quotes
|
||||
|
||||
@@ -234,7 +234,7 @@ $juice = array('apple', 'orange', 'plum');
|
||||
echo "I drank some juice made of {$juice[1]}s"; // $juice[1] will be parsed
|
||||
{% endhighlight %}
|
||||
|
||||
* [Double quotes](http://php.net/language.types.string#language.types.string.syntax.double)
|
||||
* [Double quotes](https://www.php.net/language.types.string#language.types.string.syntax.double)
|
||||
|
||||
#### Nowdoc syntax
|
||||
|
||||
@@ -260,7 +260,7 @@ EOD; // closing 'EOD' must be on its own line, and to the
|
||||
*/
|
||||
{% endhighlight %}
|
||||
|
||||
* [Nowdoc syntax](http://php.net/language.types.string#language.types.string.syntax.nowdoc)
|
||||
* [Nowdoc syntax](https://www.php.net/language.types.string#language.types.string.syntax.nowdoc)
|
||||
|
||||
#### Heredoc syntax
|
||||
|
||||
@@ -288,7 +288,7 @@ EOD; // closing 'EOD' must be on its own line, and to the
|
||||
*/
|
||||
{% endhighlight %}
|
||||
|
||||
* [Heredoc syntax](http://php.net/language.types.string#language.types.string.syntax.heredoc)
|
||||
* [Heredoc syntax](https://www.php.net/language.types.string#language.types.string.syntax.heredoc)
|
||||
|
||||
> It should be noted that multiline strings can also be formed by continuing them across multilines in a statement. _e.g._
|
||||
|
||||
@@ -326,7 +326,7 @@ Regardless of what you are doing with strings, none of the types will ever have
|
||||
application. Trying to rewrite code to use one or the other is always an exercise in futility, so avoid this
|
||||
micro-optimization unless you really understand the meaning and impact of the differences.
|
||||
|
||||
* [Disproving the Single Quotes Performance Myth](http://nikic.github.io/2012/01/09/Disproving-the-Single-Quotes-Performance-Myth.html)
|
||||
* [Disproving the Single Quotes Performance Myth](https://www.npopov.com/2012/01/09/Disproving-the-Single-Quotes-Performance-Myth.html)
|
||||
|
||||
|
||||
## Ternary operators
|
||||
@@ -413,4 +413,4 @@ return ($a != 3 && $b != 4) || $c == 5;
|
||||
Since PHP 5.3, it is possible to leave out the middle part of the ternary operator.
|
||||
Expression "expr1 ?: expr3" returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.
|
||||
|
||||
* [Ternary operators](http://php.net/language.operators.comparison)
|
||||
* [Ternary operators](https://www.php.net/language.operators.comparison)
|
||||
|
Reference in New Issue
Block a user