The Anatomy of a PHP script is formed by a serie of elements between highlight the next:
Comments
PHP offer different ways of to comment a code line in you script.
You can to comment a single line in shell style:
<?php
#This is a shell style comment
echo "hellow world!!!" ;
?>
You too, can to comment a single line in C style:
<?php
//This is a C style comment
echo "hellow world!!!" ;
?>
Or you can to comment a lot of lines in you code in the next way:
<?php
/* This is a multi line comment
that we would can to use!!!
*/
echo "hellow world!!!" ;
?>
White spaces
PHP is a white spaces insensitive language that let us to use the spaces that we needed, except that definition for some cases.
Code Block
All code into a function, condition or loop that is formed for more one statement will need to use branches, for example:
<?php
if(x == 1 ){
echo "hellow world!!!" ;
}else{
echo "nothing";
}
?>
Language Construct
They are all function own of the language.
Lab Practices
In developing...

No hay comentarios:
Publicar un comentario