>>365さん、すみません。
以下がコードです。

$b = array(

'x' => $X,
'y' => 1,

);

//$b['string'] = "";
//$b['result'] = '';
$a = $p->Test($b);

if ($a['string']){
echo $a['string'];
}else{
$end = $a['result'];
}

以下がエラーです。

Notice: Undefined index: string in
/home/user/public_html/class/xxx.php(xxx) : eval()'d code on line xx

Notice: Undefined index: result in
/home/user/public_html/class/xxx.php(xxx) : eval()'d code on line xx