difference between call by value and call by reference in php and also $$ means?

后端 未结 5 1204
说谎
说谎 2021-01-05 07:00

(1) I want to know what is the difference between call by value and call by reference in php. PHP works on call by value or call by reference?

(2) And a

5条回答
  •  粉色の甜心
    2021-01-05 07:44

    Call by value means passing the value directly to a function. The called function uses the value in a local variable; any changes to it do not affect the source variable.

    Call by reference means passing the address of a variable where the actual value is stored. The called function uses the value stored in the passed address; any changes to it do affect the source variable.

提交回复
热议问题