Quick Table of Contents
ماذا يقصد بالتعليق
التعليقات فى الاكواد هى عبارة عن نصوص تعبر عن اسطر معينة او شرح مبسط للكود المكتوب وتستعمل ايضا لكتابة حقوق الملكية الفكرية فى كل ملف. اذن التعليقات هى نصوص يتجاهلها مترجم البى اتش بى والبى اتش بى تحتوى على العديد من طرق التعليق مثل التعليق الذى يشمل اكثر من سطر واحد والتعليق الخاص لسطر واخد [Edit] Single-Line C++ Syntax
Comments often require no more than a single line. Because of its brevity, there is no need to delimit the comment’s conclusion because the newline \n character fills this need quite nicely. PHP supports C++ single-line comment syntax, which is prefaced with a double slash //, like this: <?php echo 'This is a test'; // This is a one-line c++ style comment /* This is a multi line comment yet another line of comment */ echo 'This is yet another test'; ?> [Edit] Shell Syntax
PHP also supports an alternative to the C++-style single-line syntax, known as shell syntax, which is prefaced with a hash mark #. Revisiting the previous example, I’ll use hash marks to add some information about the script: <?php # Title: My first PHP script echo "This is a PHP program."; ?> [Edit] C Syntax
It’s often convenient to include somewhat more verbose functional descriptions or other explanatory notes within code, which logically warrants numerous lines. Although you could preface each line with C++ or shell-style delimiters, PHP also offers a multiple-line variant that can open and close the comment on different lines. Here’s an example: <?php /** * this is comment * this is comment agian */ ?> |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved