__LINE__ The current line number of the file. __FILE__ The full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP 4.0.2, __FILE__ always contains an absolute path whereas in older versions it contained relative path under some circumstances. __FUNCTION__ The function name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the function name as it was declared (case-sensitive). In PHP 4 its value is always lowercased. __CLASS__ The class name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the class name as it was declared (case-sensitive). In PHP 4 its value is always lowercased. __METHOD__ The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive). if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); } // This prints out that "they are the same" if ($fst === $str) { echo "they are the same"; } if (is_int($an_int)) { $an_int += 4; } if (is_string($a_bool)) { echo "String: $a_bool"; } $GLOBALS $_SERVER $_GET $_POST $_COOKIE $_FILES $_ENV $_REQUEST $_SESSION $new = htmlspecialchars("Test", ENT_QUOTES); echo $new; // <a href='test'>Test</a> s $str = "A 'quote' is bold"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str); // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); $query_string = 'foo=' . urlencode($foo) . '&bar=' . urlencode($bar); echo '';