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; $short = base64_encode(pack('S', $val)); $str = base64_encode(strval($val)); echo "$short $string $val \n";}
based on RVgZp
Output for 5.0.4 - 5.6.21, 7.0.0 - 7.1.0
Notice: Undefined variable: string in /in/5pBHD on line 11 AAA= 0 Notice: Undefined variable: string in /in/5pBHD on line 11 ZgY= 1638 Notice: Undefined variable: string in /in/5pBHD on line 11 zAw= 3276 Notice: Undefined variable: string in /in/5pBHD on line 11 MhM= 4914 Notice: Undefined variable: string in /in/5pBHD on line 11 mBk= 6552 Notice: Undefined variable: string in /in/5pBHD on line 11 /h8= 8190 Notice: Undefined variable: string in /in/5pBHD on line 11 ZCY= 9828 Notice: Undefined variable: string in /in/5pBHD on line 11 yiw= 11466 Notice: Undefined variable: string in /in/5pBHD on line 11 MDM= 13104 Notice: Undefined variable: string in /in/5pBHD on line 11 ljk= 14742 Notice: Undefined variable: string in /in/5pBHD on line 11 /D8= 16380 Notice: Undefined variable: string in /in/5pBHD on line 11 YkY= 18018 Notice: Undefined variable: string in /in/5pBHD on line 11 yEw= 19656 Notice: Undefined variable: string in /in/5pBHD on line 11 LlM= 21294 Notice: Undefined variable: string in /in/5pBHD on line 11 lFk= 22932 Notice: Undefined variable: string in /in/5pBHD on line 11 +l8= 24570 Notice: Undefined variable: string in /in/5pBHD on line 11 YGY= 26208 Notice: Undefined variable: string in /in/5pBHD on line 11 xmw= 27846 Notice: Undefined variable: string in /in/5pBHD on line 11 LHM= 29484 Notice: Undefined variable: string in /in/5pBHD on line 11 knk= 31122 Notice: Undefined variable: string in /in/5pBHD on line 11 +H8= 32760
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: string in /in/5pBHD on line 11 AAA= 0 Notice: Undefined variable: string in /in/5pBHD on line 11 ZgY= 1638 Notice: Undefined variable: string in /in/5pBHD on line 11 zAw= 3276 Notice: Undefined variable: string in /in/5pBHD on line 11 MhM= 4914 Notice: Undefined variable: string in /in/5pBHD on line 11 mBk= 6552 Notice: Undefined variable: string in /in/5pBHD on line 11 /h8= 8190 Notice: Undefined variable: string in /in/5pBHD on line 11 ZCY= 9828 Notice: Undefined variable: string in /in/5pBHD on line 11 yiw= 11466 Notice: Undefined variable: string in /in/5pBHD on line 11 MDM= 13104 Notice: Undefined variable: string in /in/5pBHD on line 11 ljk= 14742 Notice: Undefined variable: string in /in/5pBHD on line 11 /D8= 16380 Notice: Undefined variable: string in /in/5pBHD on line 11 YkY= 18018 Notice: Undefined variable: string in /in/5pBHD on line 11 yEw= 19656 Notice: Undefined variable: string in /in/5pBHD on line 11 LlM= 21294 Notice: Undefined variable: string in /in/5pBHD on line 11 lFk= 22932 Notice: Undefined variable: string in /in/5pBHD on line 11 +l8= 24570 YGY= 26208 xmw= 27846 LHM= 29484 knk= 31122 +H8= 32760
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: string in /in/5pBHD on line 11 AAA= 0 Notice: Undefined variable: string in /in/5pBHD on line 11 ZgY= 1638 Notice: Undefined variable: string in /in/5pBHD on line 11 zAw= 3276 Notice: Undefined variable: string in /in/5pBHD on line 11 MhM= 4914 Notice: Undefined variable: string in /in/5pBHD on line 11 mBk= 6552 Notice: Undefined variable: string in /in/5pBHD on line 11 /h8= 8190 Notice: Undefined variable: string in /in/5pBHD on line 11 ZCY= 9828 Notice: Undefined variable: string in /in/5pBHD on line 11 yiw= 11466 Notice: Undefined variable: string in /in/5pBHD on line 11 MDM= 13104 Notice: Undefined variable: string in /in/5pBHD on line 11 ljk= 14742 Notice: Undefined variable: string in /in/5pBHD on line 11 /D8= 16380 Notice: Undefined variable: string in /in/5pBHD on line 11 YkY= 18018 Notice: Undefined variable: string in /in/5pBHD on line 11 yEw= 19656 Notice: Undefined variable: string in /in/5pBHD on line 11 LlM= 21294 Notice: Undefined variable: string in /in/5pBHD on line 11 lFk= 22932 Notice: Undefined variable: string in /in/5pBHD on line 11 +l8= 24570 Notice: Undefined variable: string in /in/5pBHD on line 11 YGY= 26208 Notice: Undefined variable: string in /in/5pBHD on line 11 xmw= 27846 Notice: Undefined variable: string in /in/5pBHD on line 11 LHM= 29484 Notice: Undefined variable: string in /in/5pBHD on line 11 knk= 31122 Notice: Undefined variable: string in /in/5pBHD on line 11 +H8= 32760