diff options
author | Dimitris Kokkonis <kokkonisd@gmail.com> | 2020-10-10 12:31:09 +0200 |
---|---|---|
committer | Dimitris Kokkonis <kokkonisd@gmail.com> | 2020-10-10 12:31:09 +0200 |
commit | 916dceba25fcca6d7d9858d25c409bc9984c5fce (patch) | |
tree | fb9e604256d3c3267e0f55de39e0fa3b4b0b0728 /php.html.markdown | |
parent | 922fc494bcce6cb53d80a5c2c9c039a480c82c1f (diff) | |
parent | 33cd1f57ef49f4ed0817e906b7579fcf33c253a1 (diff) |
Merge remote-tracking branch 'upstream/master' into master
Diffstat (limited to 'php.html.markdown')
-rw-r--r-- | php.html.markdown | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/php.html.markdown b/php.html.markdown index 40c9dd01..57ba29c4 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -34,6 +34,7 @@ echo "World\n"; // Prints "World" with a line break ?> Hello World Again! <?php +// That is because historically PHP started as a Template engine /************************************ @@ -41,12 +42,15 @@ Hello World Again! */ // Variables begin with the $ symbol. -// A valid variable name starts with a letter or underscore, +// A valid variable name starts with a letter or an underscore, // followed by any number of letters, numbers, or underscores. +// You don't have to (and cannot) declare variables. +// Once you assign a value, PHP will create the variable with the right type. + // Boolean values are case-insensitive $boolean = true; // or TRUE or True -$boolean = false; // or FALSE or False +$boolean = FALSE; // or false or False // Integers $int1 = 12; // => 12 @@ -289,7 +293,7 @@ if (false) { print (false ? 'Does not get printed' : 'Does'); // ternary shortcut operator since PHP 5.3 -// equivalent of "$x ? $x : 'Does'"" +// equivalent of "$x ? $x : 'Does'" $x = false; print($x ?: 'Does'); |