Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Ways to write comments in PHP

/*There are two types of comments:
1) Spans over multiple lines - Multiple-line comment
2) Spans over one line only - Sinlge-line comment
*/

/* There are two ways to write a single-line comment:
1) Using double slash
2) Using the hash tag
*/

// This is an example of single-line comment using double slash
# This is an example of single-line comment using hash tag

/*There is only one way of using multiple line comments, startin with the 
slash and asterisk respectively, and ending with asterisk and slash 
respectively */ 
Comment

comments in php

//For a single line comment use //:
//this is a comment too
//for multi-line comments use /* and */:
/* <--start of multi-line comment
this is a comment

this is a comment too (end of multi-line comment)-->*/
Comment

php proper function comments

/**
 * This function compiles a message that tells you how great coffee is
 *
 * @param string  $compliment A nice word to describe coffee 
 * @param integer $score      A score out of 10
 */
Comment

how to create comments in php


Answer: Use the Syntax "// text" (single line) and "/* text */"
(multi-line)
Comment

php docs comments

/**
 * Summary.
 *
 * Description.
 *
 * @since x.x.x
 *
 * @see Function/method/class relied on
 * @link URL
 * @global type $varname Description.
 * @global type $varname Description.
 *
 * @param type $var Description.
 * @param type $var Optional. Description. Default.
 * @return type Description.
 */
Comment

comments in php

//
/*
*/
Comment

PREVIOUS NEXT
Code Example
Php :: display data from two dimensional array in vew laravel 
Php :: PHP DateTime Format date time according to a time zone 
Php :: acf add options page to custom post type 
Php :: wp-config for production 
Php :: session value not removed php 
Php :: $ is not define in laravel 
Php :: laravel-enum 
Php :: php error handling 
Php :: PHP strrpos — Find the position of the last occurrence of a substring in a string 
Php :: database, counts 
Php :: laravel updateorcreate multiple records 
Php :: laravel blade array seearch select box 
Php :: how to check if file is empty in php 
Php :: Using the PHPExcel library to read an Excel file and transfer the data into a database 
Php :: make resource in laravel 
Php :: how to create cookie in laravel 
Php :: sum two numbers in php 
Php :: Automatic Subdomain with PHP 
Php :: using get in laravel blade 
Php :: laravel one to many relationship 
Php :: php json_encode remove array index 
Php :: how to change validation message in laravel 
Php :: curl download progress bar php 
Php :: limit query codeiniter 3 
Php :: php language is used for 
Php :: curl_setopt_array php 
Php :: Skip model accessor laravel8 
Php :: conditional validation laravel based on role 
Php :: laravel digits between does not working 
Php :: limit wordpress search to title 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =