Malhar Lathkar has Published 155 Articles

PHP Expressions

Malhar Lathkar

Malhar Lathkar

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

7K+ Views

IntroductionAlmost everything in a PHP script is an expression. Anything that has a value is an expression. In a typical assignment statement ($x=100), a literal value, a function or operands processed by operators is an expression, anything that appears to the right of assignment operator (=)Syntax$x=100; //100 is an expression ... Read More

PHP goto Statement

Malhar Lathkar

Malhar Lathkar

Updated on 19-Sep-2020 13:14:00

4K+ Views

IntroductionThe goto statement is used to send flow of the program to a certain location in the code. The location is specified by a user defined label. Generally, goto statement comes in the script as a part of conditional expression such as if, else or case (in switch construct)Syntaxstatement1; statement2; ... Read More

PHP if else elseif

Malhar Lathkar

Malhar Lathkar

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

2K+ Views

IntroductionConditional execution of one or more statements is a most important feature of any programming language. PHP provides this ability with its if, else and elseif statements. Primary usage of if statement is as follows −Syntaxif (expression)    statement;The expression in front of if keyword is a logical expression, evaluated ... Read More

PHP Variable functions

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 14:00:58

8K+ Views

IntroductionIf name of a variable has parentheses (with or without parameters in it) in front of it, PHP parser tries to find a function whose name corresponds to value of the variable and executes it. Such a function is called variable function. This feature is useful in implementing callbacks, function ... Read More

PHP User-defined functions

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:57:22

17K+ Views

IntroductionPHP has a large number of built-in functions such as mathematical, string, date, array functions etc. It is also possible to define a function as per specific requirement. Such function is called user defined function.A function is a reusable block of statements that performs a specific task. This block is ... Read More

PHP Function arguments

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:38:56

4K+ Views

IntroductionA function in PHP can be defined to accept input from calling environment/script in the form of arguments. These arguments are given as comma separeted list inside the parentheses in front of name of function. Note that while calling a function, same number of arguments must be passed to it.PHP ... Read More

PHP return Statement

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:30:52

2K+ Views

IntroductionThe purpose of return statement in PHP is to return control of program execution back to the environment from which it was called. Upon returning, execution of expression following the one which invooked other function or module.If return statement occurs inside a function, execution of current function is terminated, handing ... Read More

PHP require_once Statement

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:23:49

236 Views

IntroductionThe require_once statement in PHP is similar in functioning to that of require statement. Only difference is, if a file has been already included for processing, it will not be included again.Note that a file included with either include or require statement will also be not included again even if require_once ... Read More

PHP require Statement

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:22:25

210 Views

IntroductionEffect of require statement is similar to include statement in PHP. However, there is one main difference. If the parser fails to find required file, it produces a fatal error thereby termination of current script. The include statement on the other hand emits a warning in case of failure to ... Read More

PHP include_once Statement

Malhar Lathkar

Malhar Lathkar

Updated on 18-Sep-2020 13:17:27

221 Views

IntroductionJust as the include statement, include_once also transfers and evaluates script written in one file in another, the difference in two lies in the fact that include_once prevents same file from reloading if already done. As the name indicates, a file will be included only once even if one tries ... Read More

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