I don't have a lot of samples, so I cannot test. But can anyone tell me the data type of the client ID of an MCPE client? Signed or not signed (will it be negative) long, int or short is the best for saving it with low memory usage? (I am making a single-file database with binary data saving with Utils::writeLong() etc.)
Client ID, the one sent from the MCPE client. ($clientID at Player::__construct()) Entity ID is the one by the server.
I'm not sure about that. writeDouble() just uses the pack() function of php which size is system dependent, writeLong() uses a method that I can't understand but looks like a non system dependent double (64 bit). I would go for writeLong()