Pass By Ref Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ralphNOSPAM@primemail.com

    Pass By Ref Error

    I'm getting this error on my PHP CLI script. If this feature is being
    depreciated, then how are we to pass vars by reference???

    Function parse_for_wind( $php_line, &$php_total_win d_matches,
    &$php_highest_w ind)

    [Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
    pass-by-reference has been deprecated - argument passed by value; If
    you would like to pass it by reference, modify the declaration of
    parse_ceil_patt ern().


  • ZeldorBlat

    #2
    Re: Pass By Ref Error

    >From the looks of your error the problem isn't in your declaration of
    parse_for_wind but rather somewhere else where you call
    parse_ceil_patt ern().

    I'm guessing that somewhere else in your code you have something like:

    //some code
    parse_ceil_patt ern(&$arg1, &$arg2...);
    //some more code

    If you want parse_ceil_patt ern to take it's arguments as references,
    you need to change the function declaration -- much like you have for
    parse_for_wind( ).

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: Pass By Ref Error

      ralphNOSPAM@pri memail.com wrote:
      <snip>[color=blue]
      > [Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
      > pass-by-reference has been deprecated - argument passed by value; If
      > you would like to pass it by reference, modify the declaration of
      > parse_ceil_patt ern().[/color]



      --
      <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com

      Comment

      • ralphNOSPAM@primemail.com

        #4
        Re: Pass By Ref Error

        On Wed, 24 Aug 2005 14:45:04 -0700, ralphNOSPAM@pri memail.com wrote:
        [color=blue]
        >I'm getting this error on my PHP CLI script. If this feature is being
        >depreciated, then how are we to pass vars by reference???
        >
        >Function parse_for_wind( $php_line, &$php_total_win d_matches,
        >&$php_highest_ wind)
        >
        >[Wed Aug 24 16:22:08 2005] [error] PHP Warning: Call-time
        >pass-by-reference has been deprecated - argument passed by value; If
        >you would like to pass it by reference, modify the declaration of
        >parse_ceil_pat tern().
        >[/color]

        Thanks everyone - that was the answer; pass by reference using arrays.

        Comment

        Working...