Page 107 - Open Soource Technologies 304.indd
P. 107
Open Source Technologies
Notes • ob_start — Turn on output buffering
• output_add_rewrite_var — Add URL rewriter values
• output_reset_rewrite_vars — Reset URL rewriter values
6.2 Summary
• Variables overall in PHP are proceeded with a $ sign and similar to most modern
languages.
• Eight different data types exist in PHP, five of which are scalar and each of the remaining
three has its own uniqueness.
• Strings in PHP are a sequence of characters that are always internally nullterminated.
• An array in PHP is a collection of key/value pairs.
• PHP contains three types of operators: unary operators, binary operators, and one binary
operator.
6.3 Keywords
Comparison Operators: Comparison operators enable you to determine the relationship between
two operands. When both operands are strings, the comparison is performed lexicographically.
Comparison Expressions: Comparison expressions.evaluate to either FALSE or TRUE.
Concatenation Operator: The concatenation operator concatenates two strings. This operator
works only on strings; thus, any non-string operand is first converted to one.
Debugger: The Code::Blocks debugger has full breakpoint support. It also allows the user to
debug their program by having access and using the local function symbol.
Expressions: Expressions are the most important building stones of PHP. In PHP, almost
anything you write is an expression. The simplest yet most accurate way to define an expression
is “anything that has a value”.
Switch Statement: The switch statement is an alternative way of changing flow, based on the
evaluation of an expression.
Type Casting: Type casting is the name of the process in which a specific data type is transformed
into another (e.g., switching from a string data type to an integer data type).
Type Juggling: It means a variable is not restricted to just one data type. This means that you’re
allowed to switch any variable between all the available data types without having to do anything.
1. Make the syntax table.
2. Define switch flow.
6.4 Self Assessment Questions
1. You can define a constant by using the define() function. Once a constant is defined
(a) It can never be changed or undefined.
(b) It can never be changed but can be undefined.
102 LOVELY PROFESSIONAL UNIVERSITY