summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Schumacher <maximilianbschumacher@gmail.com>2020-07-07 12:09:54 +0200
committerGitHub <noreply@github.com>2020-07-07 12:09:54 +0200
commitefb04d3183488926b5a5a339d618339db6ed1006 (patch)
treedf894e6b8c098a9cb327412fd6a9331b5ab284fe
parent5afd8843b869aefdbcb4f4ad1473cb417d6c11f9 (diff)
parent8767bb3a157a9449a78d02943796324573dc537d (diff)
Merge pull request #3939 from pendashteh/patch-2
Explains variable declaration plus a minor improvement
-rw-r--r--php.html.markdown7
1 files changed, 5 insertions, 2 deletions
diff --git a/php.html.markdown b/php.html.markdown
index d4103e97..e1411085 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -41,12 +41,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