comanage-dev - Re: [comanage-dev] endif vs braces
Subject: COmanage Developers List
List archive
- From: Marie Huynh <>
- To: Benn Oshrin <>
- Cc:
- Subject: Re: [comanage-dev] endif vs braces
- Date: Tue, 3 Apr 2012 13:13:35 -0700
Can you take a look at this revised diff?
On Mon, Apr 2, 2012 at 6:20 AM, Benn Oshrin <> wrote:
I think your suggestion sounds good. The minor addition I'd add would be to put a comment in the close tag to make it easier to track which tag goes with which. eg:
<?php if($foo): ?>
<?php if($bar): ?>
<?php endif; // bar ?>
<?php endif; // foo ?>
I'll add a section to the style guide.
On 3/30/12 7:51 PM, Marie Huynh wrote:
As far as I know, there is no functional difference between using this:
<?php if(){ ?>
stuff;
<?php } ?>
and this:
<?php if() : ?>
stuff;
<?php endif; ?>
Benn, have you given any thought to this or found any reason to go with
one or the other since we talked about it? I think it makes sense to
use the latter for parts of the view with lots of html that are much
cleaner with the controls split into different php tags, but unnecessary
if they are in the same <?php ?>. Does that sound like a good guideline?
Marie
Attachment:
co80
Description: Binary data
- Re: [comanage-dev] endif vs braces, Benn Oshrin, 04/02/2012
- Re: [comanage-dev] endif vs braces, Marie Huynh, 04/03/2012
- Re: [comanage-dev] CO-80 diff, Benn Oshrin, 04/05/2012
- Message not available
- Message not available
- Re: [comanage-dev] CO-80 diff, Marie Huynh, 04/10/2012
- Re: [comanage-dev] CO-80 diff, Benn Oshrin, 04/13/2012
- Re: [comanage-dev] CO-80 diff, Marie Huynh, 04/10/2012
- Message not available
- Message not available
- Re: [comanage-dev] CO-80 diff, Benn Oshrin, 04/05/2012
- Re: [comanage-dev] endif vs braces, Marie Huynh, 04/03/2012
Archive powered by MHonArc 2.6.16.