3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $max = 32767; $n = 20; $step = intval($max/$n); for ($i=0; $i<=$n; $i++) { $val = $i*$step; echo base64_encode(pack('S', $val)) . " $val \n"; }
based on sbj0D
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
AAA= 0 ZgY= 1638 zAw= 3276 MhM= 4914 mBk= 6552 /h8= 8190 ZCY= 9828 yiw= 11466 MDM= 13104 ljk= 14742 /D8= 16380 YkY= 18018 yEw= 19656 LlM= 21294 lFk= 22932 +l8= 24570 YGY= 26208 xmw= 27846 LHM= 29484 knk= 31122 +H8= 32760