Re: Passing by reference question.

From: Date: Fri, 30 Nov 2018 00:30:16 +0000
Subject: Re: Passing by reference question.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-326611@lists.php.net to get a copy of this message
Hello Aziz; Thank you so much for your help. That seemed to solve the issue. I don't use stackoverflow.com any more. I was boot off for questionable and undefined reasons. I have also had strange difficulties with their interface processing code altering code I had posted for reference before that. I would have included source code but the amount of the code I would have to post would be excessive. Thanks again; Jeff k. > On Nov 29, 2018, at 4:19 PM, Aziz Saleh <azizsaleh@gmail.com> wrote: > > 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@prodigy.net> 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.

« previous php.general (#326611) next »