<?php
echo "start";
echo converter(1234567890)."<br/>";
echo "stop";

function converter($value){
    $unit=array('B','KB','MB','GB','TB');
    $worth = converter_divisor($value, 0);
	echo "\n ddang \n";
    var_dump($worth);
	echo "\n ddang \n";
	
}

function converter_divisor($value, $sentinel){
    while(($value/1024)>1)
        {
        converter_divisor(($value/1024),($sentinel+1));
        $helper=array($value,$sentinel);
	echo "\n bdang \n";
	var_dump($helper);
	echo "\n w tym miejscu fukcja kończy działanie \n";
	echo "\n i ta wartość jest przypisana do zmienej \$worth \n";
	echo "\n bdang \n";
	return $helper;
        }
    echo $value." ".$sentinel."<br/>";
    echo "\ngdang \n";
    var_dump(array($value,$sentinel));
    echo "\ngdang \n";
    return array($value,$sentinel);
    //$helper=array($value,$sentinel);
    echo "\ncdang \n";
    var_dump($helper);
echo "cdang \n";
//	return ($helper);
}
?>