PHP Classes

File: helper/dec2hex.php

Recommend this page to a friend!
  Classes of Alexey Starikov  >  PHP Helper Class  >  helper/dec2hex.php  >  Download  
File: helper/dec2hex.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Helper Class
Call helper functions that are loaded dynamically
Author: By
Last change:
Date: 3 years ago
Size: 329 bytes
 

Contents

Class file image Download
<?php
//dec2hex
return function($number)
{
   
$hexvalues = array('0','1','2','3','4','5','6','7',
              
'8','9','A','B','C','D','E','F');
   
$hexval = '';
     while(
$number != '0')
     {
       
$hexval = $hexvalues[bcmod($number,'16')].$hexval;
       
$number = bcdiv($number,'16',0);
    }
    return
$hexval;
}
?>

For more information send a message to info at phpclasses dot org.