SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Function parameter question

    Hi all,

    I've being looking around at diffrent scripts/tutorials. and i've seen alot of functions that look like this...

    PHP Code:
    function test($var false){
    // Do stuff...

    And...

    PHP Code:
    function test($var 0){
    // Do stuff...

    I understand what the & reference does but what do the two i've mentioned above do and how would I use them?

    Thanks in advance, Tom.

  2. #2
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,398
    Mentioned
    65 Post(s)
    Tagged
    1 Thread(s)
    See Default argument values in the manual.
    Salathe
    Software Developer and PHP Manual Author.

  3. #3
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks


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
  •