dizews / php-ubjson

Universal Binary JSON for PHP
9 stars 7 forks source link

Negative integers are always encoded as INT8 #6

Open laufhannes opened 5 years ago

laufhannes commented 5 years ago
var_dump(UBJSON::decode(UBJSON::encode(-129)));
// out: int(127)

because of https://github.com/dizews/php-ubjson/blob/137001f8d8a1bf2433514e8c14a5ad73054233e7/UBJSON.php#L166-L181