Just this algorithm i need in php.
def OOOOO(__0):
try:
__0, OOO = __0.split("."), "0123456789/:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
__0 = {"header": loads(b64decode(f"{__0[0]}=======").decode("utf-8")),"payload": loads(b64decode(f"{__0[1]}=======").decode("utf-8")),"raw": {"header": __0[0], "payload": __0[1], "signature": __0[2]}}
def OO(__):
for _ in range(len(__) - 1, -1, -1):
if __[_] < len(OOO) - 1:
__[_] += 1;return True
__[_] = 0
return False
def OOO0(__):
_ = ""
for ___ in range(len(__)): _ += OOO[__[___]]
return _
def O0OO(_, __):
_00O, _OO0 = [], sha1(__.encode()).digest()
for n in range(0, 160): _00O.append(_OO0[-1] >> 1)
def _i(O00O, O000):
if O000 in O00O: return O00O.index(O000)
return -1
return 0 == _00O[:_][0] and _i(_00O[:_], 1) >= _ - 1 or -1 == _i(_00O[:_], 1)
def OO0OO():
for e in range(25):
n = [0 for i in range(e)]
while OO(n):
if O0OO(__0["payload"]["s"], f'{__0["payload"]["d"]}::{OOO0(n)}'): return OOO0(n)
return ":".join(["1", str(__0["payload"]["s"]),datetime.now().isoformat()[:19].replace("T", "").replace("-", "").replace(":", ""), __0["payload"]["d"], "", str(OO0OO())])
except: pass
Can you help me to convert that code in php?