Optional By Ref Argument?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Little

    Optional By Ref Argument?

    Is it possible to make a by-reference argument optional in a UDF? When I
    try to assign it a default value in the definition, I get a parse error,
    "unexpected '='". PHP itself has optional by-ref arguments (e.g. getmxrr);
    is it not possible for UDFs?

    --
    Alan Little
    Phorm PHP Form Processor

  • Pedro Graca

    #2
    Re: Optional By Ref Argument?

    Alan Little wrote:[color=blue]
    > Is it possible to make a by-reference argument optional in a UDF? When I
    > try to assign it a default value in the definition, I get a parse error,
    > "unexpected '='". PHP itself has optional by-ref arguments (e.g. getmxrr);
    > is it not possible for UDFs?[/color]

    It's possible with PHP 5, impossible (as far as I know) with PHP 4
    Some time ago there was a discussion here about that:


    --
    Mail sent to my "From:" address is publicly readable at http://www.dodgeit.com/
    == ** ## !! !! ## ** ==
    TEXT-ONLY mail to the complete "Reply-To:" address ("My Name" <my@address>) may
    bypass the spam filter. I will answer all pertinent mails from a valid address.

    Comment

    • Alan Little

      #3
      Re: Optional By Ref Argument?

      Carved in mystic runes upon the very living rock, the last words of
      Pedro Graca of comp.lang.php make plain:
      [color=blue]
      > Alan Little wrote:[color=green]
      >> Is it possible to make a by-reference argument optional in a UDF?[/color]
      >
      > It's possible with PHP 5, impossible (as far as I know) with PHP 4
      > Some time ago there was a discussion here about that:
      > http://groups.google.com/groups?thre...030819.1bb543b
      > 2%40posting.goo gle.com[/color]

      OK, thanks.

      --
      Alan Little
      Phorm PHP Form Processor

      Comment

      Working...