createElement('a'); $a->setAttribute('href', 'javascript:void(0)'); $a->setAttribute('onclick', "this.nextSibling.style.display = (this.nextSibling.style.display === 'none' ? 'block' : 'none')"); $a->appendChild($doc->createTextNode('Показать/скрыть объект API')); $div = $doc->createElement('div'); $div->setAttribute('style', 'display: none; font-size: 11px; font-family: monospace; background-color: #edeef0; padding: 10px; white-space: pre; overflow: auto;'); $div->appendChild($doc->createTextNode($obj)); $node->appendChild($doc->createElement('br')); $node->appendChild($a); $node->appendChild($div); $is_modified = true; }, null); } catch (Exception $e) { fatalError($e->getMessage()); } if ($is_modified) file_put_contents($file, iconv('utf-8', 'windows-1251//IGNORE', $doc->outertext));