将0x750201转换为人类可读日期

So the date I have is 0x750201 which should include the year, month and day.

I've got the Javascript code that converts this to a date:

function getYMD(n) {
  // [y,m,d]
  return [(((n >> 16) & 0xFF) + 1900), ((n >>> 8) & 0xFF), (n & 0xFF)];
}

But I have no idea what it's doing and thus can't translate it to php, any ideas?

Here are some examples of what the code translate into:

0x750201 is 2017, 2, 1
0x75020e is 2017, 2, 14

Oh hah, thanks @Jaromanda X, didn't realise you could do this in PHP.

Turns out this does indeed work just fine, thanks for the help!

function getYMD($n) {
  // [y,m,d]
  return [((($n >> 16) & 0xFF) + 1900), (($n >> 8) & 0xFF), ($n & 0xFF)];
}
print_r(getYMD(0x750201));