Question: How can you pass an argument by reference when defining a function? How can you pass an argument by reference when defining a function? function

How can you pass an argument by reference when defining a function?
How can you pass an argument by reference when defining a function?
function doSomething(@value_by_reference){// code }
function doSomething(&$value_by_reference){//code }
Passing an argument by reference is not possible with PHP.
function doSomething($value_by_reference){//code }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!