Search the web
Sign In
New User? Sign Up
phpexperts
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Colon (:) vs. braces ({})   Message List  
Reply | Forward Message #12607 of 13238 |
Hey everybody,

Does anyone have a good article or opinions on using this:

if ($foo) :
endif;

Versus:

if ($foo) {
}

It applies to more than just the IF statements, but I'm seeing it in templatized systems more and more. My personal preference if for the braces version, but I was just wondering if anyone has any insight other than preference. It's easier for me to visually parse braces.
--
Joe



Thu Jul 9, 2009 3:46 pm

jforsythe@...
Send Email Send Email

Forward
Message #12607 of 13238 |
Expand Messages Author Sort by Date

Hey everybody, Does anyone have a good article or opinions on using this: if ($foo) : endif; Versus: if ($foo) { } It applies to more than just the IF...
Joe Forsythe
jforsythe@...
Send Email
Jul 10, 2009
1:33 pm

joe, this will help you to get more info about regular style and alternate style of control structures ...
Hasin Hayder
phpfive
Online Now Send Email
Jul 10, 2009
8:42 pm

Well, after extended reading on the subject, I've come up with a couple of things: 1. It's all about preference (which really answers my initial question). 2....
Joe Forsythe
jforsythe@...
Send Email
Jul 21, 2009
4:43 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help