Comment detail

ローテートシフト (Nested Flatten)
1
2
3
4
5
6
7
8
9
<?php

function rotateShift($value, $n)
{
    return substr(str_repeat(sprintf("%016b", bindec($value)), 3), 16-$n, 16);
}

$value = "0010001111101101";
var_dump(rotateShift($value, 1));

Index

Feed

Other

Link

Pathtraq

loading...