For the people that can not spend a weekend without wondering about PHP I have a little exercise. What is the output of the following piece of code:
<?php
function foo($param1, $param2){
$param1 + $param2;
}
$result = foo(1,2);
echo $result;
?>
Will it be an error, the result of the function or nothing at all? Don't spoil the fun by running it in PHP without thinking about it! The answer was a little surprising for me.
No comments:
Post a Comment