Revenue Source

Welcome to the Revenue Source affiliate marketing forums.

You are viewing our internet marketing and SEO forums as a guest which gives you limited access to most of our discussions.  By joining our free community, you will have access to post affiliate marketing topics, communicate privately with other members (PM), exchange SEO strategies, and access many other special features.  Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems, please don't hesitate to contact us.

Go Back   Revenue Source > Site Design & Development > Programming Help
Reload this Page Alex Netkachov's Blog: 6 PHP coding tips to write less code
Tags: , , , , , , , ,

Reply
 
LinkBack Thread Tools Search this Thread
Old
  (#1 (permalink))
Affiliate Blogs is Offline
Revenue Source Veteran
Affiliate Blogs has a brilliant future here!
 
Affiliate Blogs's Avatar
 
Join Date: Oct 2005
Posts: 9,230
Jack of All Trades
CyberSpace United States
   
Alex Netkachov's Blog: 6 PHP coding tips to write less code - 11-05-2007

Alex Netkachov has shared six tips in a new post on his blog today for how you can write less PHP code and get more done with it. It's based around another post from Arnold Daniels talking about a temporary variable method in PHP.
This tip is useful to "lazy" developers who do not even think about variable names. They may prefer magic names like ${0} and 0 is good enough variable name, why not...
His list consists of:
  • Use || (or) and && (and) operations instead of if.
  • Use ternary operator.
  • Use for instead of while.
  • In some cases PHP requires you to create a variable. [...] To handle all these situation you can create a set of small functions which shortcuts frequently used operations.
  • Explore the language you use.When it is better to write more and then read the code easily, do not be lazy.
Check out Vidyut Luther's response to Alex's comments too.


Alex Netkachov's Blog: 6 PHP coding tips to write less code - Read More...
  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: Alex Netkachov's Blog: 6 PHP coding tips to write less code
Thread Thread Starter Forum Replies Last Post
Alex Netkachov's Blog: PHP fluent API tips Affiliate Blogs Programming Help 0 10-29-2007 01:07 PM
Alex Netkachov's Blog: Microsoft's SQL Server 2005 driver for PHP Affiliate Blogs Programming Help 0 10-18-2007 10:22 PM
Alex Netkachov's Blog: Jamp! installer support PHP with IIS FastCGI Affiliate Blogs Programming Help 0 10-01-2007 02:33 PM
Alex Netkachov's Blog: Optimize PHP memory usage: eliminate circular references Affiliate Blogs Programming Help 0 09-18-2007 10:43 PM
Alex Netkachov's Blog: Programmatically adding PHP script engine to IIS 5.1 metabase Affiliate Blogs Programming Help 0 08-13-2007 02:52 PM



© 2004-6 RevenueSource.com.  All rights reserved.  Do not duplicate or redistribute in any form.
This website and its logos/design are property of RevenueSource.com.  All rights reserved. vBSEO 3.2.0 RC7


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34