I came across this problem and got into conflict, when using '+' in JavaScript it "joins" and in PHP it gives me a number (Hi?), good it is to fit JavaScript with PHP , see:
alert(CryptoJS.SHA1('ABCDE' + 'ABCD'.substr(0, 32)));
result: 64b9885c4ab720cabee37f0011aeb06efa27f9b3
In PHP I execute the "same" thing, but it returns something different:
echo SHA1('ABCDE' + substr('ABCD', 0, 32));
result: b6589fc6ab0dc82cf12099d1c2d40ab994e8410c
Why ? What is the explanation for this and how to adjust JavaScript?