Connecting Tech Pros Worldwide Forums | Help | Site Map

Pass By Ref Error

ralphNOSPAM@primemail.com
Guest
 
Posts: n/a
#1: Aug 24 '05
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_wind_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_pattern().



ZeldorBlat
Guest
 
Posts: n/a
#2: Aug 25 '05

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_pattern().

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

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

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

R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
#3: Aug 25 '05

re: Pass By Ref Error


ralphNOSPAM@primemail.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_pattern().[/color]

http://in.php.net/language.references.pass

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

ralphNOSPAM@primemail.com
Guest
 
Posts: n/a
#4: Aug 25 '05

re: Pass By Ref Error


On Wed, 24 Aug 2005 14:45:04 -0700, ralphNOSPAM@primemail.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_wind_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_pattern().
>[/color]

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

Closed Thread