Comments in PHP
PHP Supports single line comments as well multi-line comments.
PHP Single line comments
double back slash //
//This is my first program in PHP
$name="shyam benegal"; //Name can contain only alphabets .this is single line comment
another example:
$city="new York";//This is my home town $zip=10027
in above line "This is home my home tow $zip=10027" will be taken as single line comment.
you never get value of $zip.
PHP Multiline comments
/*
This is multi line comments
in PHP file
*/
PHP runtime interpreter ignores these lines. Comments are meant for understanding program functionality. i.e details about each function etc.,
Tags:PHP comments, comments in PHP 5.4.8, Single line comments in PHP, Multi line comments in PHP 5.4.8
No comments:
Post a Comment