+1 vote
in PHP by
Which of the following is correct to add a comment in php?

a) & …… &

b) // ……

c) /* …… */

d) Both (b) and (c)

1 Answer

0 votes
by
d) Both (b) and (c)

Description:

PHP comments can be used to describe any line of code so that other developers can understand the code easily. PHP supports single-line and multi-line comments. There are two ways to use single-line comments in PHP.

// (C++ style single line comment)

# (Unix Shell style single line comment)

For multiple lines comment in PHP, we need to enclose all lines within /* …..*/.

Related questions

+1 vote
asked May 11, 2022 in PHP by sharadyadav1986
+1 vote
asked May 13, 2022 in PHP by john ganales
...