[ZendPHP5Cerification] Lectures -- 1. PHPBasics, PHPFunctions, Arrays PHPBasics
PHPBasics refers to a number of things that
Arelikely already second nature to you:
? Syntax
? Operators
? Variables
? Constants
? Control Structures
LanguageConstructs and Functions
Magicconstants
_ LINE _ The current linenumber of the file.
_ FILE _ The full path andfilename of the file. if used inside an include, the name of theincluded file is returned. since PHP 4.0.2, _ FILE _ always contains an absolute path whereas in older versions itcontained relative path under some circumstances.
_ FUNCTION _ The function name. (Added in PHP 4.3.0) As of PHP 5 this constant returns the functionname as it was declared (case-sensitive ). in PHP 4 its value isalways lowercased.
_ CLASS _ The class name. (Addedin PHP 4.3.0) As of PHP 5 this constant returns the class name as itwas declared (case-sensitive ). in PHP 4 its value is alwayslowercased.
_ METHOD _ The class method name. (Added in PHP 5.0.0) The method name is returned as it was declared (case-sensitive ).
PHPlanguage construct
The "exact" definition for "LanguageConstruct ".
It's kind of like the "core definition agedefinition" of things such as: if (...) while (...) And so on In PHP, a handful of common things that manybeginners * THINK * are functions are actually Language Constructs: require include echo isset I belive most of them are too ented assuch in the manual now. language Construct roughly corresponds to the "grammar" of the language, if you will.
Thismeans that they are integral part of the language, just like 'if', orany operator +, *, etc, though they look pretty much like functions. it means that though syntactically they look a functions and in themanual they are listed under functions, this is only to make themeasy to use, understand locate in the documentation. that is whycertain rules for functions can be relaxed, such as requiringparenthesis around its arguments, which are not actually needed butare there so that they have the same look as regular functions.
PHP Tags
Long tags:
Script syle tags: