Re: Error using Manuel's POP3 class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 01/24/2008 02:24 PM Stephan Schulze said the following:
> Hmm, I think the following both function calls produces the same result, 
> were the second one is deprecated.
> 
> function foo(&$bar) {
>     $bar .= " WORLD";
> }
> $tmp = "HELLO";
> foo($tmp);
> echo $tmp;
> 
> function bar($foo) {
>     $foo .= " WORLD";
> }
> $tmp2 = "HELLO";
> bar(&$tmp2);
> echo $tmp2;
> 
> 
> So why not change the deprecated function call to the working one?
> If the function calls were only changed from foo(&$var) to foo($var)
> the functions will not produce the expected results. They need to be 
> changed, too!?

The current version class functions do not generate any warnings.
Warnings are only triggered when you attempt to pass an argument by
reference when the function does not take that argument by reference.
There is nothing to change in the class to avoid the warnings.


-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux