We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae63eb2 commit 595c4caCopy full SHA for 595c4ca
src/Binary.php
@@ -28,8 +28,6 @@
28
29
use InvalidArgumentException;
30
use function chr;
31
-use function define;
32
-use function defined;
33
use function ord;
34
use function pack;
35
use function preg_replace;
@@ -39,14 +37,7 @@
39
37
use function unpack;
40
38
use const PHP_INT_MAX;
41
42
-if(!defined("ENDIANNESS")){
43
- define("ENDIANNESS", (pack("s", 1) === "\0\1" ? Binary::BIG_ENDIAN : Binary::LITTLE_ENDIAN));
44
-}
45
-
46
class Binary{
47
- public const BIG_ENDIAN = 0x00;
48
- public const LITTLE_ENDIAN = 0x01;
49
50
public static function signByte(int $value) : int{
51
return $value << 56 >> 56;
52
}
0 commit comments