Adelphia web hosting - 66Part IPHP: The BasicsYou can put any kind

66Part IPHP: The BasicsYou can put any kind of statement in a brace-enclosed block, including, say, an ifstatementthat itself has a brace-enclosed block. This means that ifstatements can have other ifstate- ments inside them. In fact, this kind of nesting can be done to an arbitrary number of levels. CommentsA commentis the portion of a program that exists only for the human reader. The very firstthing that a program executor does with program code is to strip out the comments, so theycannot have any effect on what the program does. Comments are invaluable in helping thenext person who reads your code figure out what you were thinking when you wrote it, evenwhen that person is yourself a week from now. PHP drew its inspiration from several different programming languages, most notably C, Perl, and Unix shell scripts. As a result, PHP supports styles of comments from all those languages, and those styles can be intermixed freely in PHP code. C-style multiline commentsThe multilinestyle of commenting is the same as in C: A comment starts with the characterpair /*and terminates with the character pair */. For example: /* This isa comment inPHP */ The most important thing to remember about multiline comments is that they cannot benested. You cannot put one comment inside another. If you try, the comment will be closed off by the first instance of the */character pair, and the rest of what was intended to be anenclosing comment will instead be interpreted as code, probably failing horribly. For example: /* This comment will /* fail horribly on thelast word of this */ sentence*/ This is an easy thing to do unintentionally, usually when you try to deactivate a block of com- mented code by commenting it out. Single-line comments: # and // In addition to the /*…*/multiple-line comments, PHP supports two different ways of com- menting to the end of a given line: one inherited from C++ and Java and the other from Perland shell scripts. The shell-script-style comment starts with a pound sign, whereas the C++ style comment starts with two forward slashes. Both of them cause the rest of the currentline to be treated as a comment, as in the following: # This is a comment, and# this is the second line of the comment// This is a comment too. Each style comments only// one line so the last word of this sentence will failhorribly. The very alert reader might argue that single-line comments are incompatible with what wesaid earlier about whitespace insensitivity. That would be correct you will get a very
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

Leave a Reply