Php Coding Convention

67 %
33 %
Information about Php Coding Convention
Technology

Published on February 11, 2009

Author: phuongvy

Source: slideshare.net

Description

1. Coding conventions

Object Naming Conventions
Variable naming conventions
Variable data types
Variable scope prefixes

2. Class Coding Standard
3. Define function or class when coding
4. Define database and table of database

CODING CONVENTION TuVinh Services & Software Solutions ., JSC 1. Name of variable: Name of one variable define by prefix plus Name of variable Example : a. double : prefix = dbl $dblFree = 125.75; b. object : prefix = obj $objCustomer = new Customer();

2.Variable naming convention table

2.Variable naming convention table

3. Convention of funciton or classs when coding: When you create a function, you need to have one comment that funciton for detail Example: /* Author: Nguyen Thanh Dung Date create : 02/02/2009 Date repaire: 03/02/2009 Function name: getCustomerName() Input: no values Outpuut: return one array store name of customer /* function getCustomerName() { // some scripts here }

3. Convention of funciton or classs when coding: When you create a function, you need to have one comment that funciton for detail

Example:

/*

Author: Nguyen Thanh Dung

Date create : 02/02/2009

Date repaire: 03/02/2009

Function name: getCustomerName()

Input: no values

Outpuut: return one array store name of customer

/*

function getCustomerName() {

// some scripts here

}

4. Convention name of some tags on web form

4. Convention name of some tags on web form

5. Convention of database : Database name = prefix + name Table name = prefix + name Column name = prefix + name

5. Convention of database :

Database name = prefix + name

Table name = prefix + name

Column name = prefix + name

THE END

Add a comment

Related presentations

Related pages

Manual:Coding conventions/PHP - MediaWiki

This page describes the coding conventions used within files of the MediaWiki codebase written in PHP. See also the general conventions that apply to all ...
Read more

PSR-2: Coding Style Guide - PHP-FIG

Coding Style Guide. This guide extends and expands on PSR-1, the basic coding standard. The intent of this guide is to reduce cognitive friction when ...
Read more

PSR-1: Basic Coding Standard - PHP-FIG

Basic Coding Standard. This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high ...
Read more

PHP Coding Conventions - OrangeHRM Wiki

Overview Scope . This document describes the PHP coding standards used in OrangeHRM. These standards are based on the Zend Framework Coding Standard for PHP.
Read more

Manual :: Coding Standards - PEAR - PHP Extension and ...

Coding Standards; PEAR2 Coding ... Patch" page with the statement "Make sure your coding style complies with Coding Standards". ... pear.php.net/manual/en ...
Read more

Popular Coding Convention on Github - Side Effect Studio

Ben Peachey helped to add it by writing Popular Coding Convention in PHP on Github. Thanks Ben. Sep 20, 2013 added coding convention for C#.
Read more

Manual :: Naming Conventions - PHP Extension and ...

Coding Standards; Indenting and Line ... Naming Conventions. ... PHP does not yet support truly-enforceable private namespaces
Read more

Zend Framework - Issue

Zend Framework standardizes on a class naming convention whereby the names of the ... Zend Framework Coding Standard for PHP; Classes;
Read more

Zend Framework - Issue

Zend Framework Coding Standard for PHP - Programmer's Reference Guide. Zend Framework 0.6; Overview. Zend Framework Coding Standard for PHP Table of Contents
Read more

C# Coding Conventions (C# Programming Guide)

C# Coding Conventions (C# Programming Guide) Visual Studio 2015 Other Versions ... Visual Basic Coding Conventions Secure Coding Guidelines.
Read more