PHP coding specification (28) _ PHP Tutorial

Source: Internet
Author: User
PHP coding specification (28 ). 10 Sample Code ** @ (#) Cngift. php1.82030625 ** sample document written by the blooming Stone * will provide a simple demonstration of the encoding specifications ** require ("db. php "); *** demonstration class ** 10 Sample code

/*
* @ (#) Cngift. php 1.82 03/06/25
*
* Sample documents written by blooming stones
* Simple demonstration of coding specifications
*
*/


Require ("db. php ");

/**
* Demonstration class
*
* @ Version 1.82 03.06.25
* @ Author Blossom Stone
*/
Class Blah extends SomeClass {
/* This class runtime annotation is written here */

/** Write comments on variables here */
Static int $ classVar1;

/**
* Write comments on multiple lines of variables here
*/
Static string classVar2;

/** Variable document comment */
Int instanceVar1;

/** Variable document comment */
Int [] instanceVar3;

/**
* Constructor comments
*/
Function Blah (){
//... Execute here...
}

/**
*... Function documentation comment...
*/
Function doSomething (){
//... Execute here...
}

/**
*... Method annotation document ..
* Multi-line comment
*/
Public void doSomethingElse (Object someParam ){
//... Execute here...
}
}


Sample http://www.bkjia.com/PHPjc/532576.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532576.htmlTechArticle10 code/** @ (#) Cngift. php 1.82 03/06/25 ** sample document written by the blooming Stone * will provide a simple demonstration of the encoding specifications **/require ("db. php ");/*** demonstration class **...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.