I need to simulate the BigInteger conversion to long in Java. That means that if the BigInteger is too big to fit in a long, only the low-order 64 bits are returned. But I'm new in Php so I have no idea how to do it.
i.e. From 393581355135911291782311 in java I got 1623579244298503335.
BigInteger result_long = new BigInteger("393581355135911291782311");
System.out.println("->" + result_long.toString());
I've tried Brick\Math library but the problem is that there is only the method "toInteger()" and it does not give me the low-order 64 bits.