3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $base16Alphabet = 'abcdefghijklmnop'; $hash = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"; $result = ''; for ($i = 0; $i < 16; $i++) { $byte = ord($hash[$i]); $result .= $base16Alphabet[$byte & 0xF0 >> 4] . $base16Alphabet[$byte & 0x0F]; } echo $result;
Output for 5.2.10 - 5.6.28, 7.0.0 - 7.1.0
Notice: Uninitialized string offset: 8 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 9 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 10 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 11 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 12 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 13 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 14 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 15 in /in/ZTa1M on line 8 bbddffhhjjllnnppaaaaaaaaaaaaaaaa
Output for hhvm-3.10.0 - 3.12.0
bbddffhhjjllnnppaaaaaaaaaaaaaaaa
Output for 4.3.0 - 5.2.9
Notice: Uninitialized string offset: 8 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 9 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 10 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 11 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 12 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 13 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 14 in /in/ZTa1M on line 8 Notice: Uninitialized string offset: 15 in /in/ZTa1M on line 8 bbddffhhjjllnnppaaaaaaaaaaaaaaaa