example code
function myfunc1()
{
return myfunc2();
}
function myfunc2()
{
return myfunc3();
}
function myfunc3()
{
return very_large_stri ng; // let's say that very large string is 30kb
of data
}
print myfunc1();
The question is, would these 30Kb of data be copied into each function
wasting resources or only reference to these data would be propagated to
myfunc1? PHP version is 5.0.x
Best regards,
--
B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
function myfunc1()
{
return myfunc2();
}
function myfunc2()
{
return myfunc3();
}
function myfunc3()
{
return very_large_stri ng; // let's say that very large string is 30kb
of data
}
print myfunc1();
The question is, would these 30Kb of data be copied into each function
wasting resources or only reference to these data would be propagated to
myfunc1? PHP version is 5.0.x
Best regards,
--
B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
Comment