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

Thursday, January 12, 2012

ZCE Zend Certified Engineer String return problem


View the Complete Blog on ZCE

function stringAppend(&$str)

{

        return $str = $str."append";

}

function stringPrepend(&$str)

{

         $str = "prepend".$str;

}


$aString = "PHP";

echo stringPrepend(stringAppend($aString));

Answer: NULL
becuase stringPrepend dint return anything


No comments:

Post a Comment