$embedCode = <<<EOF
getApplicationContent('video','player',array('id' => $iFileId, 'user' => $this->iViewer, 'password' => clear_xss($_COOKIE['memberPassword'])),true)
EOF;
$name = str_replace($embedCode,"test",$content);
コードのセクションを別のコードに置き換えようとしています。小さい文字列でも実行できますが、大きい文字列を$ embedCodeに追加すると、「予期しないT_ENCAPSED_AND_WHITESPACE」エラーがスローされます。