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

Wednesday, January 11, 2012

ZCE Zend Certified Engineer String Append Prepend question answer

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.



No comments:

Post a Comment