Hướng dẫn php bigint to hex - php bigint sang hex

Làm thế nào tôi có thể chuyển đổi điều này:

9312660682897061594767289296453011313180604726492752614962349778735928598708212386406555876878916185094145420038141655929349984786756296776268556142401047 

trong cơ sở 16?

Tôi đã tìm thấy chức năng đệ quy này:

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }

Nhưng mức độ làm tổ của 100 là đạt được, ngay cả khi tôi có xdebug.max_nesting_level = 1000 trong tệp cấu hình php.ini của tôi.

Cấu hình xdebug của tôi trông như thế này:

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug

Ai đó có một chức năng khác với bất kỳ gợi ý nào về cách tôi có thể chuyển đổi số nguyên này không?

Cảm ơn!

detrate tại hotmail dot com

Gabriel Reguly ¶Hexadecimal to decimal

17 năm trước

Giám mục ¶(string $hex_string): int|float

zubfatal, root tại IT DOT DK ¶ will ignore any non-hexadecimal characters it encounters. As of PHP 7.4.0 supplying any invalid characters is deprecated.

Groobo ¶

this1is4me tại hotmail dot com ¶

Maddddidley tại Yahoo Dot Com ¶

andreas.schmeiler ¶

19 năm trước

Ayadav tại Infoprocorp Dot Com ¶

Andy tại Haveland dot com ¶17 năm trước
7.4.0 Giám mục ¶

zubfatal, root tại IT DOT DK ¶

Groobo ¶hexdec() example

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>

this1is4me tại hotmail dot com ¶

Maddddidley tại Yahoo Dot Com ¶:

andreas.schmeiler ¶int type, larger values are returned as float in that case.

19 năm trước

  • Ayadav tại Infoprocorp Dot Com ¶
  • Andy tại Haveland dot com ¶
  • 11 năm trước
  • Rosberg - Rosberglinhares tại Gmail Dot Com ¶

12 năm trước

Cory tại Lavacube Dot Com ¶

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.

For eg: #FFF and #FFFFFF will produce the same result

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
0

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
1

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

detrate tại hotmail dot com

Gabriel Reguly ¶

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
3

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
4

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

17 năm trước

Cory tại Lavacube Dot Com ¶

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
6

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
7

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

detrate tại hotmail dot com

Repley tại Freemail Dot it ¶

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
9

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
0

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
1

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
2

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
3

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
4

16 năm trước

Cory tại Lavacube Dot Com ¶

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
5

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
6

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
7

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
8

detrate tại hotmail dot com

14 năm trước

;Xdebug
zend_extension = "${path}\php\php546x121216181946\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart = false
xdebug.dump_globals=1
xdebug.dump=COOKIE,FILES,GET,POST,REQUEST,SERVER,SESSION
xdebug.dump.SERVER=REMOTE_ADDR,REQUEST_METHOD,REQUEST_URI
xdebug.show_local_vars=1
xdebug.show_mem_delta=1
xdebug.collect_includes=1
xdebug.collect_vars=1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=0
xdebug.trace_options=0
xdebug.trace_format=0
xdebug.trace_output_dir="${path}\xdebug\trace"
xdebug.trace_output_name="trace.%t"
xdebug.profiler_enable=0
xdebug.profiler_append=1
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir="${path}\xdebug\profiler"
xdebug.profiler_output_name="cachegrind.out.%s.%t"
xdebug.max_nesting_level = 1000
;/Xdebug
9

$hex_string0

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Gabriel Reguly ¶

Cory tại Lavacube Dot Com ¶

$hex_string2

$hex_string3

$hex_string4

$hex_string5

Ẩn danh ¶

Repley tại Freemail Dot it ¶

$hex_string6

$hex_string7

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

16 năm trước

14 năm trước

$hex_string9

hex_string0

hex_string1

hex_string2

hex_string3

hex_string4

hex_string5

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Cory tại Lavacube Dot Com ¶

Gabriel Reguly ¶

hex_string7

hex_string8

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

17 năm trước

Cory tại Lavacube Dot Com ¶

hex_string0

hex_string1

hex_string2

hex_string3

hex_string4

hex_string5

hex_string6

hex_string7

detrate tại hotmail dot com

Cory tại Lavacube Dot Com ¶

hex_string8

hex_string9

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
0

helpmedalph tại gmail dot com ¶

6 năm trước

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
1

Chrism ở bốn điểm ròng ¶

20 năm trước

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
2

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
3

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
4

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Joquius tại Kakugo Dot Com ¶

14 năm trước

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
6

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
7

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Ẩn danh ¶

14 năm trước

var_dump(hexdec("See"));
var_dump(hexdec("ee"));
// both print "int(238)"var_dump(hexdec("that")); // print "int(10)"
var_dump(hexdec("a0")); // print "int(160)"
?>
9

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.0

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.1

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Ẩn danh ¶

Manithu ¶

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.3

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.4

15 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.5

Manithu ¶

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.7

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.8

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

15 năm trước

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.5

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.0

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.1

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.2

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.3

Cgarvis tại Gmail Dot Com ¶

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.5

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.4

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.5

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.6

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.7

Cgarvis tại Gmail Dot Com ¶

Use this function to convert a hexa decimal color code to its RGB equivalent. Unlike many other functions provided here, it will work correctly with hex color short hand notation.5

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.8

Also, if a proper hexa decimal color value is given (6 digits), it uses bit wise operations for faster results.9

For eg: #FFF and #FFFFFF will produce the same result0

For eg: #FFF and #FFFFFF will produce the same result1

For eg: #FFF and #FFFFFF will produce the same result2

Cgarvis tại Gmail Dot Com ¶

Repley tại Freemail Dot it ¶

For eg: #FFF and #FFFFFF will produce the same result3

For eg: #FFF and #FFFFFF will produce the same result4

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

16 năm trước

Repley tại Freemail Dot it ¶

For eg: #FFF and #FFFFFF will produce the same result6

For eg: #FFF and #FFFFFF will produce the same result7

For eg: #FFF and #FFFFFF will produce the same result8

For eg: #FFF and #FFFFFF will produce the same result9

16 năm trước

Repley tại Freemail Dot it ¶

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
00

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
01

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
02

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
03

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
04

16 năm trước

Repley tại Freemail Dot it ¶

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
05

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
06

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

16 năm trước

14 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
08

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
09

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
10

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
11

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Ẩn danh ¶

14 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
13

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
14

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
15

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
16

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
17

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
18

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
19

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
20

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

andreas.schmeiler ¶

19 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
22

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
23

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
24

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
25

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Ayadav tại Infoprocorp Dot Com ¶

16 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
27

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
28

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
29

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
30

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
31

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
32

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2

Andy tại Haveland dot com ¶

11 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
34

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
35

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
36

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
37

Rosberg - Rosberglinhares tại Gmail Dot Com ¶

12 năm trước

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
38

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
39

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
40

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
41

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
42

function bcdechex($dec) {
            $last = bcmod($dec, 16);
            $remain = bcdiv(bcsub($dec, $last), 16);

            if($remain == 0) {
                return dechex($last);
            } else {
                return bcdechex($remain).dechex($last);
            }
        }
2