PHP Syntax And Semantics
   HOME
*





PHP Syntax And Semantics
The syntax and semantics of PHP, a programming language, form a set of rules that define how a PHP program can be written and interpreted. Overview Historically, the development of PHP has been somewhat haphazard. To counter this, the PHP Framework Interop Group (FIG) has created The PHP Standards Recommendation (PSR) documents that have helped bring more standardization to the language since 2009. The modern coding standards are contained in PSR-1 (Basic Coding Standard) and PSR-2 (Coding Style Guide). Keywords Some keywords represent things that look like functions, some look like constants, but they are actually language constructs. It is forbidden to use any keywords as constants, class names, functions or methods. Using them as variable names is allowed, but it can be confusing. *__halt_compiler() *abstract *and *array() *as *break *callable (as of PHP 5.4) *case *catch *class *clone *const *continue *declare *default *die() *do *echo *else *elsei ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Syntax (programming Languages)
In computer science, the syntax of a computer language is the rules that defines the combinations of symbols that are considered to be correctly structured statements or expressions in that language. This applies both to programming languages, where the document represents source code, and to markup languages, where the document represents data. The syntax of a language defines its surface form. Text-based computer languages are based on sequences of characters, while visual programming languages are based on the spatial layout and connections between symbols (which may be textual or graphical). Documents that are syntactically invalid are said to have a syntax error. When designing the syntax of a language, a designer might start by writing down examples of both legal and illegal strings, before trying to figure out the general rules from these examples. Syntax therefore refers to the ''form'' of the code, and is contrasted with semantics – the ''meaning''. In processing ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Binary File
A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files containing formatted text, such as older Microsoft Word document files, contain the text of the document but also contain formatting information in binary form. Structure Binary files are usually thought of as being a sequence of bytes, which means the binary digits (bits) are grouped in eights. Binary files typically contain bytes that are intended to be interpreted as something other than text characters. Compiled computer programs are typical examples; indeed, compiled applications are sometimes referred to, particularly by programmers, as binaries. But binary files can also mean that they contain images, sounds, compressed versions of other files, etc. – in short, any type of file content whatsoever. Some binary files contain ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Curly Brackets
A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'right' bracket or, alternatively, an "opening bracket" or "closing bracket", respectively, depending on the directionality of the context. Specific forms of the mark include parentheses (also called "rounded brackets"), square brackets, curly brackets (also called 'braces'), and angle brackets (also called 'chevrons'), as well as various less common pairs of symbols. As well as signifying the overall class of punctuation, the word "bracket" is commonly used to refer to a specific form of bracket, which varies from region to region. In most English-speaking countries, an unqualified word "bracket" refers to the parenthesis (round bracket); in the United States, the square bracket. Various forms of brackets are used in mathematics, with s ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Associative Array
In computer science, an associative array, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In mathematical terms an associative array is a function with ''finite'' domain. It supports 'lookup', 'remove', and 'insert' operations. The dictionary problem is the classic problem of designing efficient data structures that implement associative arrays. The two major solutions to the dictionary problem are hash tables and search trees..Dietzfelbinger, M., Karlin, A., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H., and Tarjan, R. E. 1994"Dynamic Perfect Hashing: Upper and Lower Bounds". SIAM J. Comput. 23, 4 (Aug. 1994), 738-761. http://portal.acm.org/citation.cfm?id=182370 In some cases it is also possible to solve the problem using directly addressed arrays, binary search trees, or other more specialized structures. Many programming languages include ass ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Square Brackets
A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'right' bracket or, alternatively, an "opening bracket" or "closing bracket", respectively, depending on the directionality of the context. Specific forms of the mark include parentheses (also called "rounded brackets"), square brackets, curly brackets (also called 'braces'), and angle brackets (also called 'chevrons'), as well as various less common pairs of symbols. As well as signifying the overall class of punctuation, the word "bracket" is commonly used to refer to a specific form of bracket, which varies from region to region. In most English-speaking countries, an unqualified word "bracket" refers to the parenthesis (round bracket); in the United States, the square bracket. Various forms of brackets are used in mathematics, with s ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Concatenation
In formal language, formal language theory and computer programming, string concatenation is the operation of joining character string (computer science), character strings wikt:end-to-end, end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenation theory, also called string theory, string concatenation is a primitive notion. Syntax In many programming languages, string concatenation is a binary operation, binary infix operator. The + (plus) operator is often operator overloading, overloaded to denote concatenation for string arguments: "Hello, " + "World" has the value "Hello, World". In other languages there is a separate operator, particularly to specify implicit type conversion to string, as opposed to more complicated behavior for generic plus. Examples include . in Edinburgh IMP, Perl, and PHP, .. in Lua (programming language), Lua, and & in Ada, AppleScript, and Visual Basic. Other syntax exists, like ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Free-form Language
In computer programming, a free-form language is a programming language in which the positioning of characters on the page in program text is insignificant. Program text does not need to be placed in specific columns as on old punched card systems, and frequently ends of lines are insignificant. Whitespace characters are used only to delimit tokens, and have no other significance. Most free-form languages descend from ALGOL, including C, Pascal, and Perl. Lisp languages are free-form, although they do not descend from ALGOL. Rexx is mostly free-form, though in some cases whitespace characters are concatenation operators. SQL, though not a full programming language, is also free-form. Most free-form languages are also structured programming languages, which is sometimes thought to go along with the free-form syntax: Earlier imperative programming languages such as Fortran 77 used particular columns for line numbers, which many structured languages do not use or need. Structu ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Whitespace (computer Science)
In computer programming, whitespace is any character or series of characters that represent horizontal or vertical space in typography. When rendered, a whitespace character does not correspond to a visible mark, but typically does occupy an area on a page. For example, the common whitespace symbol (also ASCII 32) represents a blank space punctuation character in text, used as a word divider in Western scripts. Overview With many keyboard layouts, a whitespace character may be entered by pressing . Horizontal whitespace may also be entered on many keyboards with the key, although the length of the space may vary. Vertical whitespace may be input by typing , which creates a 'newline' code sequence in most programs. On older keyboards, this key may instead be labeled , a holdover from typewriter keyboards' carriage return keys, which generated an electromechanical return to the left stop (Unicode character ) and a move to the next line (). Many early computer games used whitesp ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Newline
Newline (frequently called line ending, end of line (EOL), next line (NEL) or line break) is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a sequence of characters, is used to signify the end of a line of text and the start of a new one. History In the mid-1800s, long before the advent of teleprinters and teletype machines, Morse code operators or telegraphists invented and used Morse code prosigns to encode white space text formatting in formal written text messages. In particular the Morse prosign (mnemonic reak ext) represented by the concatenation of literal textual Morse codes "B" and "T" characters sent without the normal inter-character spacing is used in Morse code to encode and indicate a ''new line'' or ''new section'' in a formal text message. Later, in the age of modern teleprinters, standardized character set control codes were developed to aid in white space ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Type Conversion
In computer science, type conversion, type casting, type coercion, and type juggling are different ways of changing an expression from one data type to another. An example would be the conversion of an integer value into a floating point value or its textual representation as a string, and vice versa. Type conversions can take advantage of certain features of type hierarchies or data representations. Two important aspects of a type conversion are whether it happens ''implicitly'' (automatically) or ''explicitly'', and whether the underlying data representation is converted from one representation into another, or a given representation is merely ''reinterpreted'' as the representation of another data type. In general, both primitive and compound data types can be converted. Each programming language has its own rules on how types can be converted. Languages with strong typing typically do little implicit conversion and discourage the reinterpretation of representations, whi ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Heredoc
In computing, a here document (here-document, here-text, heredoc, hereis, here-string or here-script) is a file literal or input stream literal: it is a section of a source code file that is treated as if it were a separate file. The term is also used for a form of multiline string literals that use similar syntax, preserving line breaks and other whitespace (including indentation) in the text. Here documents originate in the Unix shell, and are found in the Bourne shell (sh), C shell (csh), tcsh (tcsh), KornShell (ksh), Bourne Again Shell (bash), and Z shell (zsh), among others. Here document-style string literals are found in various high-level languages, notably the Perl programming language (syntax inspired by Unix shell) and languages influenced by Perl, such as PHP and Ruby. JavaScript also supports this functionality via template literals, a feature added in its 6th revision (ES6). Other high-level languages such as Python, Julia and Tcl have other facilities for multiline ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Primitive Type
In computer science, primitive data types are a set of basic data types from which all other data types are constructed. Specifically it often refers to the limited set of data representations in use by a particular processor, which all compiled programs must use. Most processors support a similar set of primitive data types, although the specific representations vary. More generally, "primitive data types" may refer to the standard data types built into a programming language. Data types which are not primitive are referred to as ''derived'' or ''composite''. Primitive types are almost always value types, but composite types may also be value types. Common primitive data types The Java virtual machine's set of primitive data types is: * Integer types with a variety of ranges and precisions (byte, short, int, long, char) * Floating-point number with single or double precisions; (float, double) * Boolean, logical values true and false. (boolean) * A value referring to an exec ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]