<?php

$html = <<<EOT
<div id="isOffered">
   <a class="price addBetButton footballBetButton" id="bk_82285689_mk_sel1" href="">
   <span class="priceText wide UK">1/2</span>
   <span class="priceText wide EU">1.50</span>
   <span class="priceText wide US">-200</span>
   <span class="priceText wide CH">1.50</span>
   <span class="priceChangeArrow"></span>
   <input class="betCode" type="hidden" value="0]SK@82285689@314222649@NB*1~2*0*-1*0*0]CPN:0" />
   <input class="originalBetCode" type="hidden" value="0]SK@82285689@314222649@NB*1~2*0*-1*0*0]CPN:0" /> 
   </a>
</div>
EOT;

$DOM =  new DOMDocument();
$DOM->loadHTML($html);

$xpath = new DomXpath($DOM);

$prices = $xpath->query('//*[contains(concat(" ", normalize-space(@class), " "), "priceText ")]');
$percent = 20.0 / 100.0; // 20%

foreach($prices as $price){
	$value = $price->nodeValue;
	$floatValue = floatval($value);
	$finalValue = $floatValue - ($percent * $floatValue);
	echo sprintf("O valor %.2f teve um desconto de %.2f. Valor com desconto %.2f\r\n", $floatValue, 
	$percent, $finalValue);
}

