Hi all,
Could anyone help me about returning the array from a function in PHP? What is the right way to do it in PHP?
I've tried by reference and also returned as a local variable. Both works but is they good for big arrays??? Is they safe??
However, my current knowledge prompts me (from C++) that returning a pointer or a reference might be dangerous (this variable can go out of scope).
I appreciate for your information.
P.S. Can you also suggest any documentation about the good style of programming in PHP. I often have such questions:(.
Could anyone help me about returning the array from a function in PHP? What is the right way to do it in PHP?
I've tried by reference and also returned as a local variable. Both works but is they good for big arrays??? Is they safe??
However, my current knowledge prompts me (from C++) that returning a pointer or a reference might be dangerous (this variable can go out of scope).
I appreciate for your information.
P.S. Can you also suggest any documentation about the good style of programming in PHP. I often have such questions:(.
Comment