simaguo/javascript-bitwise-operators

php to achieve javascript bitwise operation

Installs: 98

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/simaguo/javascript-bitwise-operators

v1.0.2 2017-06-29 04:30 UTC

This package is not auto-updated.

Last update: 2025-10-04 05:07:24 UTC


README

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

Installation

composer require simaguo/javascript-bitwise-operators

Usage

<?php
    use Simaguo\JavascriptBitwiseOperators\Tool;
    
    $a=1024;
    $b=2;
    Tool::andOperator($a, $b);//$a & $b
    Tool::notOperator($a);//~$a
    Tool::orOperator($a, $b);//$a | $b
    Tool::shiftLeftOperator($a, $b);//$a << $b
    Tool::shiftRightOperator($a, $b);//$a >> $b
    Tool::unSignedShiftRightOperator($a,$b);//$a >>> $b
    Tool::xorOperator($a,$b);//$a ^ $b