View the Complete Blog on ZCE
function stringAppend($str)
{
$str = $str."append";
}
function stringPrepend($str)
{
$str = "prepend".$str;
}
$aString = "PHP";
echo stringPrepend(stringAppend($aString));
Answer: NULL
Because aString is not passed by reference.
function stringAppend($str)
{
$str = $str."append";
}
function stringPrepend($str)
{
$str = "prepend".$str;
}
$aString = "PHP";
echo stringPrepend(stringAppend($aString));
Answer: NULL
Because aString is not passed by reference.
No comments:
Post a Comment