kvz/phpjs — pull request #55 by deadbyte (2012-11-26 17:33:18+00:00)
Title: Fix unpack to work with shorts

Hi, I found a bug in function unpack(). In some cases this function returns wrong results, for example the following statement:
unpack("ve_type/ve_machine", "\x02\x00\x3e\x00");

returns:
({e_type:0, e_machine:0})

while the expected result is:
({e_type:2, e_machine:62})

The bug comes from missing parenthesis around a binary shift operation.