Open
Description
Following code https://github.com/krowinski/php-mysql-replication/blob/master/src/MySQLReplication/BinaryDataReader/BinaryDataReader.php#L72 works by accident because s
uses native architecture. And every Intel/AMD CPU is in little endian architecture which is the same as binlog bytes layout.
Architecture should be forced in unpack pattern ( s<
- like in Perl, I'm not sure if PHP supports it).
Or native architecture should be checked and bytes reversed before unpacking in case of mismatch.