Home > Backend Development > PHP Tutorial > PHP coding standards (28)_PHP tutorial

PHP coding standards (28)_PHP tutorial

WBOY
Release: 2016-07-13 17:20:34
Original
849 people have browsed it

10 Code Examples

/*
 * @(#)Cngift.php 1.82 03/06/25
 *
 * Sample document written by Hua Shitou
> *
*/

require( “db.php” );

/**

* Demonstration class
*
* @version 1.82 03.06.25
*/
class Blah extends SomeClass {
 /* The runtime comments for this class are written here */

 /**Comments about variables are written here*/

 static int $classVar1;


 /**

* Multi-line comments on variables are written here

*/
 static string classVar2;

 /**Documentation comments for variables*/

 int instanceVar1;


 /**Documentation comments for variables*/

 int[] instanceVar3;


 /**

 * Constructor comments

*/
 function Blah() {
   // ...execute here...
 }

 /**

 * ...Documentation comments for functions...

 */
 function doSomething() {
   // ...execute here...
 }

 /**

 * ...Annotation documentation for the method..

 * Multi-line comments
 */
 public void doSomethingElse(Object someParam) {
   // ...execute here...
 }
}



http://www.bkjia.com/PHPjc/532576.html

truehttp: //www.bkjia.com/PHPjc/532576.htmlTechArticle10 Code Example/* * @(#)Cngift.php 1.82 03/06/25 * * Written by Huashi Shi The sample document* will provide a simple demonstration of the coding standards* */ require( "db.php" ); /** * Class for demonstration* *...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template