stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


PHP coding guidelines







PHP coding guidelines

PHP coding guidelines 01/05/2004 12:27 PM

The guidelines that I follow when writing my PHP scripts; can be helpful to have something like this if you're working on a joint project.




This is a GrokNews Entry: (what is grok?)





Similar Items

PHP coding guidelines

Grok Headline matches for PHP coding guidelines

Evolt.org: PHP Coding Guidelines


Evolt.org: PHP Coding Guidelines 01/06/2004 09:13 AM
In an effort to bring some kind of standard to the PHP coding world, the folks over at Evolt.org have posted a new article detailing one man's effort to standardize the code he writes.

Improve your technique: Take advantage
of JavaScript coding guidelines


Improve your technique: Take advantage
of JavaScript coding guidelines
12/11/2003 02:48 AM
CNET Dec 11 2003 2:44AM ET

PHP Coding Standard


PHP Coding Standard 11/27/2002 09:47 PM
Learn how to develop your own coding specifications.

Coding and Climbing


Coding and Climbing 04/02/2005 03:48 PM
It had never occurred to me that writing software is like climbing Mt. Fuji, but Step han Grell makes it all clear.

YSL Coding Libraries


YSL Coding Libraries 12/11/2003 06:12 PM
Transfer of CVS repository in progress

Coding Frenzy


Coding Frenzy 05/14/2004 09:02 AM
Warning: techtalk follows, you may freely skip this if your eyes glaze over at the word "XML".

I've been in a coding frenzy for the past couple of days. JSPWiki has had some considerable additions, here being the relevant part of the ChangeLog:

2004-05-14  Janne Jalkanen 
<Janne.Jalkanen@nospam.ecyrd.com>

        * v2.1.97.

        * Added preliminary support for the Atom blog API.  It still
does
        not yet completely work, however.

I'll be a non-productive member of the society for the next three-four days (another wedding? Don't people get tired of these things already?), so nothing much may happen. But yeah, I nearly got ecto working with JSPWiki.

There is still however a question on how the blog and wiki apis should interact. You see, the page Main on this site is both a weblog and a wiki page. I'm having trouble, you see:

  • GET to /atom/ lists all wiki pages (which means that even on this site, there are a lot of them) - not just the weblogs (since every page can be a weblog, even the weblog entry pages)
  • GET to /atom/Main... Should it list all of the blog entries, or should it GET the Wiki page content? Both are valid interpretations...

I'm confused... Which is the correct way to handle this? Should a WikiWebl og combination have separate URIs for Wiki and Weblog functionality? Isn't that kinda redundant?


Bar Coding The World Away


Bar Coding The World Away 07/12/2004 12:55 PM

PHP Coding Contest


PHP Coding Contest 07/17/2002 11:07 AM
Codewalkers.com has posted their latest PHP Coding Contest.

Why You Need Coding Standards


Why You Need Coding Standards 09/23/2004 03:07 AM
WebmasterBase Sep 23 2004 7:30AM GMT

Coding standards 101


Coding standards 101 05/31/2002 08:11 AM

The Coding Monkeys


The Coding Monkeys 05/18/2004 07:35 AM
you can read all about it & download it from here .. the application formerly known as Hydra .. SubEthaEdit: Introducing version 2.0 .. SubEthaEdit; .. SubEthaEdit .. Rock on !! .. More >

codingmonkeys.de/subethaedit
track this site | 5 links


How Would You Handle a $1,000,000 Coding
Error?


How Would You Handle a $1,000,000 Coding
Error?
07/19/2004 11:48 PM

Wavefront Coding for phonecams


Wavefront Coding for phonecams 09/14/2004 03:48 AM
Xeni Jardin: A new type of lens may make blurry phonecam snapshots a thing of the past:
A specially shaped camera lens and processing method to ensure images are always in focus has been developed. Physicist Dr Andy Harvey said it was a "simple system with a simple lens" which uses an optical encoder so that no information in images is lost. Developed primarily for military night vision cameras, the technology could find its way into camera phones.
Link (thanks, Siege)

New PHP coding contest at Codewalkers


New PHP coding contest at Codewalkers 12/09/2002 05:10 AM
Win a whole lotta stuff—including a one-year subscription to php|a—with a bit of your PHP magic

Nice, secure coding


Nice, secure coding 09/09/2004 04:47 PM
Meanwhile, on a irc channel in a galaxy far, far away: 23:18 <gav> also $x=$cgi->param(‘x’); &{$x}(); It’s always good to...

Useful Applescripts for coding PHP in
BBEdit


Useful Applescripts for coding PHP in
BBEdit
12/12/2003 07:48 PM
At work I spend a lot of time coding, which means I also spend a lot of time using BBEdit . Thankfully it's a fantastic program with excellent Applescript integration. As a PHP coder, I thought I'd share some of the great Applescripts that are out there to enhance your coding experience, and hopefully save you some time. VoidFil lPHP This is a PHP code completion script. Type the beginning of function name, hit F1 (or whatever key you've assigned it to), and it provides a list a potential matches (e.g. type html and you can choose from html_entity_decode, htmlentities or htmlspecialchars). Search php.net for selection It does what it says on the tin. Highlight a PHP function or keyword, hit the assigned key combination, and it fires up a browser window and searches through the manual on php.net for the function or keyword. Very useful if you've not got a PHP reference book handy. PHP Syntax Check Written by John Gruber (a former Bare Bones developer, so he obviously knows a thing or two), this flexible script can scan your document for PHP parsing errors (highlighting the problematic lines). The script can also replace the built-in HTML Document Syntax command, so it can check the syntax of your HTML also. Pretty nifty huh? What other Applescripts make your BBEdit life easier?

PHP-Editors.com: New PHP Coding Contest


PHP-Editors.com: New PHP Coding Contest 04/13/2004 07:25 AM
New from php-editors.com this morning is their latest PHP Programming Contest.

SitePoint: Why You Need Coding Standards


SitePoint: Why You Need Coding Standards 09/23/2004 08:58 AM
In a new article on Sitepoint, David Mytton explains why coding standards are important not only to the individual developer or development team, but to the script users as well. He takes a problem-solution approach to creating maintainable code, peeks at different coding standards, and also has a zip file of his own coding standards that you may want to use.

Tips on Defensive Coding


Tips on Defensive Coding 04/12/2004 04:52 PM
In this second excerpt from Advanced PHP Programming, George Schlossnagle offers advice on how to defend against both attacks and carelessness.

Parenting and a Career in Coding?


Parenting and a Career in Coding? 06/04/2004 07:05 PM

Klondike Coding Competition


Klondike Coding Competition 06/05/2002 07:50 AM
Code Walkers are having another PHP coding competition. Prizes for this contest are a copy of Zend Studio, a Zend T-shirt, and PHP Developer's Cookbook from Sams. Have fun!

"zeldman.aaf"

Zend's PHP 5 Coding Contest


Zend's PHP 5 Coding Contest 06/06/2004 06:37 AM
Zend's PHP 5 Coding Contest is underway and accepting submissions. This is every developer's chance to flaunt their PHP 5 skills and let their application shine! Applications will be rated both by your peers and by a panel of judges assembled from among the most known and well-respected names in the PHP community. Lots of prizes are available!

Codewalkers: PHP Coding Contest -
Blackjack


Codewalkers: PHP Coding Contest -
Blackjack
01/27/2004 09:13 AM
In an announcement from Codewalkers.com this morning, they have posted their latest PHP Coding Contest (yes, a real contest).

Coding Experience Not Necessarily
Required


Coding Experience Not Necessarily
Required
07/07/2004 01:17 PM
Can new GUI development tools make this generation of coders obsolete?

Codewalkers.com: Latest PHP Coding
Contest!


Codewalkers.com: Latest PHP Coding
Contest!
09/21/2004 08:14 AM
Cdodewalkers.com has announced their latest PHP Coding Contest...

Codewalkers.com latest PHP Coding
Contest


Codewalkers.com latest PHP Coding
Contest
01/27/2004 02:26 AM
A reader submits: "Codewalkers.com has released their latest PHP Coding Contest. This time around you are challenged to write a...

Zend: PHP 5 Coding Contest Results


Zend: PHP 5 Coding Contest Results 09/20/2004 08:42 AM
The much anticipated results for one of the larger coding contests have been posted - the Zend PHP5 Coding Contest results.

SDTimes.com: Zend Extends PHP to OO
Coding


SDTimes.com: Zend Extends PHP to OO
Coding
08/03/2004 09:19 AM
According to this posting from PHP Magazine, Andi Gutmans has been quoted as saying "With PHP 5.0, it’s easier for the Web scripting language to sit in the enterprise alongside the rest of the infrastructure. Unlike the previous version 4.0, delivered in 2000, 5.0 supports object-oriented programming, with features such as multiple inheritance and exception handling".

Proactive Coding: Prepare you XML for
PHP5


Proactive Coding: Prepare you XML for
PHP5
07/05/2004 04:29 AM

C Coding Tip - Self-Manage Memory
Alllocation


C Coding Tip - Self-Manage Memory
Alllocation
01/10/2004 01:35 AM

Friendster, PHP, Java, and Coding
Platforms


Friendster, PHP, Java, and Coding
Platforms
07/05/2004 07:33 PM

Friendster goes PHP: This is good news. I hate to dis Java, but, well, I hate it. Always have.

...on Friday we launched a platform rearchitecture based on loose-coupling, web standards, and a move from JSP (via Tomcat) to PHP. The website doesn't look much different, but hopefully we can now stop being a byword for unacceptably poky site performance.

Related to this, here's something that just threw me for a loop the other day —

A long time ago, I developed an open source app for churches. The app is very simple to set up and get running. I wrote it back when I didn't know the first thing about object-oriented programming, and the code certainly won't win any awards, but it did a job and did it very well. A lot of churches got it up and running and benefitted from it.

I gave up the project to someone else two years ago, and the guy who owns it now is doing great things with it. However, he just anounced that the app is being re-written in J2EE. Here's what he said:

As for J2EE, there is plenty reason why this needs to be the direction for future development of [App Name] and, in fact, all other Open Source enterprise software. PHP simply does not scale and does not offer the richness of development tools that J2EE does through the many open source projects implementing and surrounding it. There are a lot of misconceptions about J2EE that abound because many people/companies misuse/misunderstand it. It is not difficult/expensive to set up, it is not harder to develop for (past the learning curve), and it is certainly not slow (in fact, performance is one reason we are moving away from PHP's limiting CGI-like architecture).

PHP is only good for simple, lightweight web apps. J2EE is good for professional enterprise-class applications, which is what [App Name] is going to become. In the end, [App Name] development is going to become faster and far more professional and the software itself is going to become far more reliable, extensible and sophisticated.

I am wickedly biting my tonque over this, but, I tell you, I could not disagree more completely with everything this guy has written. BUT — it's not my project anymore, and this guy has really done good things with it in terms of developing a community and adding functionality. Perhaps the benefits he brought there will offset this error.

(I'm not going to mention the name of the project, because I don't want to start a war of words or anything. If you know the name of the project, please keep it to yourself. I hate to censor anything, but I'll get rid of any comments that identify the app or the developer. Thanks.)

After that little rant, it may seem strange for me to say that I'm trying not to get hung up on platforms lately. My buddy Matt has been pelting my with .Net propaganda, and Joe told me that it's fantastic as well ("I tried really hard to hate it..."). This being the case, I'm trying to stay platform neutral these days and concentrate on app design and usability, without regard for what platform the app is written in.

I've recently use PHP to write perhaps the best app I've ever designed, but I'm trying not to identify it with PHP so much. I'm trying to think that the value of the app is in the design, the flow, and the usability, and that we could re-write it in any platform that makes sense. (See this post for much more on this note.)

So why am I so hot about the aofrementioned Java re-write? Because that app is designed for organizations with very, very limited computer budgets and resources. For them to set-up a PHP-capable Web server is probably asking too much, but it was the lowest barrier to entry I could find. Above, I said "re-write it in any platform that makes sense" — I don't see that Java makes any sense here.

Okay, rant over. I've probably said too much already. I know this post will offend someone, and I apologize in advance while bracing for the deluge.

Click here to comment on this entry


Game Coding Complete, Second Edition


Game Coding Complete, Second Edition 03/14/2005 05:28 PM
Written by master game programmer and game industry expert Mike McShaffry, "Game Coding Complete, 2nd Edition" (Paraglyph) has been substantially expanded and provides new material on game interface...

[[ Visit http://www.macmegasite.com for full article ]]

PHP Complete Coding Standards: Comments


PHP Complete Coding Standards: Comments 06/18/2002 11:19 AM
In this article, the first in a series entitled the PHP Complete Coding Standards, we discuss some of the finer points in writing comments, and how less is in fact more.

U.S. slips lower in coding contest


U.S. slips lower in coding contest 04/07/2005 05:53 PM
ZDNet Apr 7 2005 9:38PM GMT

CodeWalkers.com: New PHP Coding Contest
Posted


CodeWalkers.com: New PHP Coding Contest
Posted
12/02/2002 09:13 AM

Key computer coding creator dies


Key computer coding creator dies 06/25/2004 08:39 AM
BBC Jun 25 2004 12:05PM GMT

CodeWalkers/Zend Coding Contest


CodeWalkers/Zend Coding Contest 08/05/2002 10:44 PM

Coding 4 Fun: Building a Drum Machine
with DirectSound


Coding 4 Fun: Building a Drum Machine
with DirectSound
02/14/2004 09:21 AM
Guest columnist Ianier Munoz builds a drum machine using the managed Microsoft DirectX libraries and C# to synthesize an audio stream on the fly.

New York Public Library Coding Standards


New York Public Library Coding Standards 08/14/2004 06:19 AM

NYPL: Style Guide: Need to come up with HTML and CSS coding standards for your company? You could do a lot worse than this resource — a set of well-written, easy-to-understand guides from the New York Public Library.

Click here to comment on this entry


Grok Description matches for PHP coding guidelines
GrokA matches for PHP coding guidelines

PHP coding guidelines

The following phrases have been identified by the grok system as matching this entry: php "coding standards" "coding guidelines"

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Ore. Balloons Float
900 Miles to
Nebraska (AP)

Alleged Robber
Leaves His Jail ID
Behind (AP)

Fireballs in sky
stun Spanish
(Reuters)

E-tailers ring up a
big year

groovy mother ::
Talking 'bout Key
Generation

iSEC Security
Research : :
Vulnerabilities 2004

perlPrinterInfo
0.7.0

Dokeos 1.0
tkspeedtouch 0.1
python-gammu 0.3
Wammu 0.3
Prelude PFlogger
0.8.0

sk_filter 0.2.1
CVS-SSH2 Plug-in for
Eclipse 0.1.1

CreaText HTML text
editor

JapanFilter
Request for Open
Source Mapping help

Software to Speed
Pet Adoption in Mich

Man Sues Firm Over
Unsolicited E-Mails

Crackdown May Be
Slowing Music
Downloads

Britney Tops
Internet Searches

Nigeria:
Anyiam-Osigwe Offers
Free Computer
Training to Lagos
Community Kids

CIO poll: IT
spending moves ahead

New rules fail to
can spam

No more sequels in
DVD hacking case

Consumer group sues
over copy protected
CDs

Consumer group sues
over copy-protected
CDs

Better search
results than Google?

Study shows sharp
drop in music
downloads

Open-source MySQL
spreads its wings

Final Cut Pro users
to meet

iListen gets minor
update

Stone ships Global
Warmth weather
monitoring app

FileMaker showcases
real-world database
solutions

Man Sneaks Spam
Lawsuit In While He
Still Could

Nigeria: AD Boss in
Police Net

EPIC: 2003 Privacy
Year in Reveiw

Macworld: Roxio
unveils Toast with
Jam 6

Macworld: Discreet
unveils combustion 3
for Mac

Macworld: Parliant
unveils PhoneValet
Message Center

Macworld: OWC debuts
pocket drives, G4
1.25GHz upgrade

Epson intros P-1000
Photo Viewer

General Mills CFO
joins Apple's Board

Monday Moanings
MWSF keynote to be
broadcast at Apple
Stores

Pro surfer Kelly
Slater appearing at
Hawaii Apple Store

OWC offers new G4
processor upgrades

OWC intros 5400 80GB
portable storage
solutions

HelpScribble v7.3.0
Panda Antivirus
Platinum v7.06

what is grok?