-1
I need to know the functionality of this python function so that it serves what it does and needs to transform it into the PHP programming language.
def word_to_int(word):
value = 0
exp = 1
for i in range(0, 8):
if word[i] == 1:
value += exp
exp *= 2
return value
Does anyone know what this Python code does need to turn it into PHP ?