SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict MarekS's Avatar
    Join Date
    Jan 2003
    Location
    Estonia / Tallinn
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    include is a language construct

    now... is it or is it not more common to use braces when including some external file? Or is is just the matter of taste? What is your taste?

    PHP Code:
    // both valid example includes:

    // case 1
    include APP_PATH.'test/foo.php';

    // case 2
    include(APP_PATH.'test/foo.php'); 
    I know this has been asked-asnswered before, but I just did not found the thread.

    danke,
    Last edited by MarekS; Oct 6, 2003 at 01:34.

  2. #2
    SitePoint Zealot nsr81's Avatar
    Join Date
    Nov 2002
    Location
    B'klyn, NY
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most of the code I have seen and all the code I've written uses parantheses with include and require.

    I guess it just makes the include line a bit more legible.
    Nasir
    nasir.us

  3. #3
    SitePoint Addict MarekS's Avatar
    Join Date
    Jan 2003
    Location
    Estonia / Tallinn
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep,

    Just noticed that, by default the Zend IDE 3.0.0a puts also the parentheses when it's auto colpleting the inc..

    PHP Code:
    require(|) 
    Too bad it won't put the semi colon at the end of it. The | between the () is cursor


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •