hiphop-php /hphp/test/zend/good/ext/dom/tests/bug47430.php

Language PHP Lines 18
MD5 Hash 245c5321e1910dc27c8ac7ba7d5e4c12 Estimated Cost $237 (why?)
Repository git://github.com/facebook/hiphop-php.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php 
$xml = '<?xml
version="1.0"?><html><p><i>Hello</i></p><p><i>World!</i></p></html>';
$dom = new DOMDocument();
$dom->loadXML($xml);

$elements = $dom->getElementsByTagName('i');
foreach ($elements as $i) {
  $i->previousSibling->nodeValue = '';
}

$arr = array();
$arr[0] = 'Value';

print_r($arr);

?>
Back to Top