NAME SUHAIL YOUSUF KUMAR
ROLL NO 4216
SEM 4TH
FUNCTION ARGUMENTS
WITH CALL BY VALUE AND CALL BY REFERENCE
FUNCTION ARGUMENTS
• We can pass the infirmation in PHP function through Arguments which is
separated by comma .
• While calling a function The arguments can be passed to a function in two
ways , Call by value ans Call by referennce .
CALL BY VALUE
Call by value means passing the value directly to a function . The called function
uses the value in a local variable , any change to it do not affect the source
variable .
PHP allows you to call the function by value and reference both .
In case of PHP call by value ,actual value is not modified if it is not modified inside
the function .
CALL BY REFERENCE
• Call by reference means passing the adress of a variable where the actual
value is stored . The called function uses the value stored in the passed adress:
any changes to it do affect the source variable . Hence actual value is
modified inside the function .