Re: Passing by reference question.

From: Date: Fri, 30 Nov 2018 00:19:52 +0000
Subject: Re: Passing by reference question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-326610@lists.php.net to get a copy of this message
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 argumentfunction myFunc($arg) { } Use: // Right way! myFunc($var); # pass-by-value argumentfunction 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 (#326610) next »