3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $id = 0x00000101; $increment = ($id & 0xFFFFFF00) << 2; $shard = ($id & 0x000000FF); var_dump($increment); var_dump($shard);
based on LqCLg
Output for 4.3.0 - 7.2.0
int(1024) int(1)