Malhar Lathkar has Published 155 Articles

PHP Integer Data Type

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:38:43

383 Views

Definition and UsageIn PHP, Integer is a scalar data type that represents a numeric constant represents a whole number wihout any fractional part. PHP allows an integer to be expressed in decimal, hexadecimal, octal or binary number system by prefixing appropriate symbol.By default Integer is assumed in decimal notation. For ... Read More

PHP Floating Point Data Type

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:31:53

575 Views

Definition and UsageIn PHP, float data type represents any number with a provision to contain a fractional part. The fractional part may contain digits after decimal point, or may be represented in scientific notation using either e or E. For example 100 in scientific notation is 10e2.Size of a float ... Read More

PHP Callbacks/Callables

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:26:10

624 Views

Definition and UsageCallback is a pseudo-type in PHP. With PHP 5.4, Callable type hint has been introduced, which is similar to Callback. When some object is identified as callable, it means that it can be used as a function that can be called. A callable can be a built-in or ... Read More

PHP Boolean Data Type

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:23:53

7K+ Views

Definition and UsageThis is one of the scalar data types in PHP. A boolean data can be either TRUE or FALSE. These are predefined constants in PHP. The variable becomes a boolean variable when either TRUE or FALSE is assigned.SyntaxResult of echoing TRUE value displays 1 while for FALSE it ... Read More

PHP Tags

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:19:48

7K+ Views

Definition and UsageA PHP code script is a text file having .php extension and is stored on web server. The PHP parser on server looks for special sequence of characters . These are called PHP's opening and closing tags. Statements witihn these two are interpreted by the parser. PHP script ... Read More

PHP Escaping From HTML

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 14:16:46

1K+ Views

Definition and UsagePHP file can have mixed content with code within tags embedded in a HTML document. Code outside tags is ignored by the parser, leaving it to be interpreted by client browser. A HTML document can have multiple blocks of PHP, each inside tags.Syntax HTML block ... Read More

PHP Operator Precedence

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 13:53:05

5K+ Views

IntroductionPrecedence of operators decides the order of execution of operators in an expression. For example in 2+6/3, division of 6/3 is done first and then addition of 2+2 takesplace because division operator / has higher precedence over addition operator +. To force a certain operator to be called before other, ... Read More

PHP Increment/Decrement Operators

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 13:50:56

10K+ Views

IntroductionC style increment and decrement operators represented by ++ and -- respectively are defined in PHP also. As the name suggests, ++ the increment operator increments value of operand variable by 1. The Decrement operator -- decrements the value by 1. Both are unary operators as they need only one ... Read More

PHP Execution Operator

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 13:47:10

1K+ Views

IntroductionThere is one Execution operator defined in PHP. A string inside back-ticks (``) is treated as a DOS command (a shell command in UNIX/Linux) and its output is returned. This operator is similar in operation to shell_exec() function in PHP.Following code executes DIR command and returns result as string.ExampleOutputFollowing result ... Read More

PHP Error Control Operator

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 13:42:18

1K+ Views

IntroductionIn PHP @ symbol is defined as Error Control Operator. When it is prefixed to any expression, any error encountered by PHP parser while executing it will be suppressed and the expression will be ignored.Following code tries to open a non-existing file for read operation, but PHP parser reports warningExample Live ... Read More

Previous 1 ... 4 5 6 7 8 ... 16 Next
Advertisements