项目作者: simaguo

项目描述 :
In the 64-bit operating system, php to achieve javascript bitwise operation
高级语言: PHP
项目地址: git://github.com/simaguo/javascript-bitwise-operators.git
创建时间: 2017-06-20T11:40:29Z
项目社区:https://github.com/simaguo/javascript-bitwise-operators

开源协议:

下载


In the 64-bit operating system, php to achieve javascript bitwise operation.

Installation

  1. composer require simaguo/javascript-bitwise-operators

Usage

  1. <?php
  2. use Simaguo\JavascriptBitwiseOperators\Tool;
  3. $a=1024;
  4. $b=2;
  5. Tool::andOperator($a, $b);//$a & $b
  6. Tool::notOperator($a);//~$a
  7. Tool::orOperator($a, $b);//$a | $b
  8. Tool::shiftLeftOperator($a, $b);//$a << $b
  9. Tool::shiftRightOperator($a, $b);//$a >> $b
  10. Tool::unSignedShiftRightOperator($a,$b);//$a >>> $b
  11. Tool::xorOperator($a,$b);//$a ^ $b