118Part IPHP: The BasicsSummaryPHP has a C-like set (Web domain)
118Part IPHP: The BasicsSummaryPHP has a C-like set of control structures, which branch or loop depending on the value ofBoolean expressions, which in turn can be combined using Boolean operators (and, or, xor, !, &&, ||). The structures ifand switchare used for simple branching; while, do-while, and forare used for looping, and exit()or die()terminates script execution. Most of the power of PHP resides in the large number of built-in functions provided by PHP sbenevolent army of open source developers. Each of these functions should be documented(albeit briefly) in the online manual at http://www.php.net. You can also write your own functions, which are then used in exactly the same way as thebuilt-in functions. Functions are written in a simple C-style syntax, as in the following: function my_function ($arg1, $arg2, ..) { statement1; statement2; .. return($value); } User-defined functions can use arguments of any PHP type and can also return values of anytype. The types of arguments and return values do not need to be declared. In PHP, the ordering of function definitions and function calls makes no difference, as long asevery function that is called is defined exactly once. There is no need for separate functiondeclarations or prototypes. Variables assigned inside a function are local to that function, unless specified otherwise with the globaldeclaration. Local variables may be declared tobe static,which means that they hold onto their values in between function calls. Finally, with our brief treatment of exceptions, we re well on our way to writing thoughtfulfriendly code that uses standardized error handling. …
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.