PHP ZCE mock test, interview preparation, daily lessons under chalk talk

Friday, April 27, 2012

value of $result?

What is the value of $result in the following PHP cdoe?

<?php
function timesTwo($int)
{
$int = $int*2;
}
$int = 2;
$result = timesTwo($int);
?>


a) 2
b) 0
c) 4
d) Null


You need catchy eyes in order to answer this question correctly...
Solution is d) Null  :P

No comments:

Post a Comment