- Introduction to Comments in PHP in Hindi
- PHP single line comments in PHP in Hindi
- PHP Multi-Line comments in PHP in Hindi

Contents
show
Introduction to Comments in PHP
PHP comments का उपयोग कोड की किसी भी पंक्ति का वर्णन करने के लिए किया जा सकता है ताकि अन्य डेवलपर कोड को आसानी से समझ सकें। इसका उपयोग किसी भी कोड को छिपाने के लिए भी किया जा सकता है।
PHP सिंगल लाइन और मल्टी लाइन कमेंट्स का समर्थन करता है। ये comments C / C ++ और perl style (Unix shell style) comments के समान हैं।
PHP single line comments
PHP में सिंगल लाइन comments का उपयोग करने के दो तरीके हैं।
- // (C++ style single line comment)
- # (Unix shell style single line comment)
<?php
// this is C++ style single line comment
# this is Unix Shell style single line comment
echo "Welcome to PHP single line comments";
?>
आउटपुट:
Welcome to PHP single line comments
PHP Multi-Line comments
PHP में, हम कई लाइनों को भी comments कर सकते हैं। ऐसा करने के लिए, हमें / * * / के भीतर सभी लाइनों को enclose करना होगा। आइए PHP multiple line comment का एक सरल उदाहरण देखें।
<?php
/*
Anything placed
within comment
will not be displayed
on the browser;
*/
echo "Welcome to PHP multi line comment";
?>
Output:
Welcome to PHP multi line comment