Web lists-archives.com

Re: Passing by reference question.




Code would help, but I suspect you are passing reference to the function opposed to expecting it by reference on the actual function call. Ex:
// Wrong way!
myFunc(&$arg);               # Deprecated pass-by-reference argument
function myFunc($arg) { }

Use:

// Right way!
myFunc($var);                # pass-by-value argument
function myFunc(&$arg) { }
Source: https://stackoverflow.com/a/8971301/1935500

On Thu, Nov 29, 2018 at 7:16 PM Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:
Hello;

What does this mean?

Fatal error: Call-time pass-by-reference has been removed in (path to source file);



I am trying to write a recursive function for doing various operations on file system
segments; directories with files.

I am currently working on a delete (rm -R) function.

So in one recursion create a local variable to record the name of the current directory that the recursive
function has been called on. So that next lower level needs to record its status when its looping completes and
there are no child directories in it. by setting this status, when it returns to the next higher level, the higher level
can call rmDir on it.

That local record is what is being passed by reference so its status can be set
when the current directory is empty and can be removed.



I have been getting notices from Rogue Wave about discontinuation of v 5.6 support. Does that apply to this
list?

Thank you for time and attention;
Jeff K.