3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function api_encode_uid($uid) { $sid = ($uid & 0x0000ff00)<< 16; $sid += (($uid & 0xff000000)>> 8)& 0x00ff0000; $sid += ($uid & 0x000000ff)<< 8; $sid += ($uid & 0x00ff0000)>> 16; $sid ^= 282335; return $sid; } api_encode_uid(1);
based on RJum4
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0