Absent any actual need for choosing one method over the other, does passing arrays by value to a read-only function reduce performance compared to passing them by reference?
A.Yes, because the interpreter must always create a copy of the array before passing it to the function.
B.Yes, but only if the function modifies the contents of the array.
C.Yes, but only if the array is large.
D.Yes, because PHP must monitor the execution of the function to determine if changes are made to the array.
Answers
Answered by
0
Array assignment always involves value copying.
Use the reference operator to copy an array by reference.
Use the reference operator to copy an array by reference.
Answered by
6
Hello mate
here's your answer
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Option D✔✔
yes because PHP must monitor the execution of the function to determine if changes are made to the array.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Hope it helps you
here's your answer
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Option D✔✔
yes because PHP must monitor the execution of the function to determine if changes are made to the array.
¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Hope it helps you
Similar questions
Hindi,
7 months ago
Math,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Physics,
1 year ago