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
<?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