WordPress.org

Forums

Braces vs. Colons (3 posts)

  1. jbbrwcky
    Member
    Posted 10 years ago #

    I was just reading about the WordPress Coding Standards over at the Codex (http://codex.wordpress.org/WordPress_Coding_Standards) and I looked at the braces bit. Are we encouraged to use braces rather than the colon style? Are there any plans to phase one or the other out, or will support be constant? Are there advantages of using one or the other, in terms of speed for example?

    Thanks,
    Jbbrwcky

  2. skippy
    Member
    Posted 10 years ago #

    I'm not aware of any performance difference. Colons are only encouraged when a nested block gets too long, or too many levels of indentation result.

  3. jbbrwcky
    Member
    Posted 10 years ago #

    Thx!

Topic Closed

This topic has been closed to new replies.

About this Topic