diff --git a/language/variables.xml b/language/variables.xml index 9a1eb2cdc1..494edd819e 100644 --- a/language/variables.xml +++ b/language/variables.xml @@ -1,5 +1,5 @@ - + Variables @@ -36,8 +36,8 @@ ]]> @@ -431,7 +431,7 @@ $b = 2; function Sum() { - $GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"]; + $GLOBALS['b'] = $GLOBALS['a'] + $GLOBALS['b']; } Sum(); @@ -467,7 +467,8 @@ function test_global() // Superglobals are available in any scope and do // not require 'global'. Superglobals are available - // as of PHP 4.1.0 + // as of PHP 4.1.0, and HTTP_POST_VARS is now + // deemed deprecated. echo $_POST['name']; } ?> @@ -652,7 +653,7 @@ object(stdClass)(0) { function &get_instance_ref() { static $obj; - echo "Static object: "; + echo 'Static object: '; var_dump($obj); if (!isset($obj)) { // Assign a reference to the static variable @@ -665,7 +666,7 @@ function &get_instance_ref() { function &get_instance_noref() { static $obj; - echo "Static object: "; + echo 'Static object: '; var_dump($obj); if (!isset($obj)) { // Assign the object to the static variable @@ -721,7 +722,7 @@ Static object: object(stdClass)(1) { ]]> @@ -738,7 +739,7 @@ $a = "hello"; ]]> @@ -1004,8 +1005,8 @@ if (isset($_POST['action']) && $_POST['action'] == 'submitted') { ]]> @@ -1035,7 +1036,7 @@ if (isset($_COOKIE['count'])) { } else { $count = 1; } -setcookie("count", $count, time()+3600); +setcookie('count', $count, time()+3600); setcookie("Cart[$count]", $item, time()+3600); ?> ]]>