Hello,
Tom Rogers wrote:
>
> Hi
> What is the scope of the array that holds the object ?
global
> Maybe a bit of code to show what you are after :)
It is to implement another function that will return a reference (not a
copy) of a object stored in a global array passing the index of the
array
Hi
What is the scope of the array that holds the object ?
Maybe a bit of code to show what you are after :)
Tom
At 03:37 PM 17/12/01, Manuel Lemos wrote:
>Hello,
>
>Tom Rogers wrote:
> >
> > Hi again
> > Got a bit sidetracked ... here is your original code :)
>
>Thanks, I managed to make it work
Hello,
Tom Rogers wrote:
>
> Hi again
> Got a bit sidetracked ... here is your original code :)
Thanks, I managed to make it work for me similarly to that.
Now, a different problem, I already have array variable with a object.
Is there a way to make a function return a reference to that object
Hi again
Got a bit sidetracked ... here is your original code :)
class test_class2
{
var $dummy="nothing";
};
Function not_assigning(&$not_returned,&$copy)
{
global $object;
$object = new test_class;
$object->dummy="original";
$success=1;
$n
Hi
Is this doing what you want, seems you have to use an array to create the
ref (just getting a handle on objects :)
dummy="original";
$success=1;
$copy=$object;
$copy->dummy="copy";
$returned[] = &$object;
var_dump("In the function"
5 matches
Mail list logo