$sayi1 = 4;
$sayi2 = 1;
function hesapla($sayi1,$sayi2){
$result=0;
if($sayi1>$sayi2){
$result=(($sayi1-$sayi2)/$sayi1)*100;
}else{
$result=(($sayi2-$sayi1)/$sayi1)*100;
}
return 100-$result;
}
$islem = hesapla($sayi1,$sayi2);
echo $islem;
?>