3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $max = 32767; $n = 20; $step = intval($max/$n); for ($i=0; $i<=$n; $i++) { $val = $i*$step; $short = base64_encode(pack('S', $val)); $str = base64_encode(strval($val)); echo "$short $str $val \n";}
based on 5pBHD
Output for 4.3.0 - 7.2.0
AAA= MA== 0 ZgY= MTYzOA== 1638 zAw= MzI3Ng== 3276 MhM= NDkxNA== 4914 mBk= NjU1Mg== 6552 /h8= ODE5MA== 8190 ZCY= OTgyOA== 9828 yiw= MTE0NjY= 11466 MDM= MTMxMDQ= 13104 ljk= MTQ3NDI= 14742 /D8= MTYzODA= 16380 YkY= MTgwMTg= 18018 yEw= MTk2NTY= 19656 LlM= MjEyOTQ= 21294 lFk= MjI5MzI= 22932 +l8= MjQ1NzA= 24570 YGY= MjYyMDg= 26208 xmw= Mjc4NDY= 27846 LHM= Mjk0ODQ= 29484 knk= MzExMjI= 31122 +H8= MzI3NjA= 32760