3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prg_id = "781657"; $firstresult = '0'; $key = 6606; $s = sprintf("%d", $prg_id); for($i = 0; $i < strlen($s); $i++) { $firstresult[$i] = chr(ord($s[$i]) ^ ($key>>8)); $key = (int)ord($firstresult[$i]) + (int)$key; $key = (int)($key * 74102); $key = (int)($key + 12337); } $ascii = $firstresult; $len = strlen($ascii); $result = ""; for ($i=0; $i<$len; $i++) $result.=sprintf("%02x",ord(substr($ascii,$i,1))); echo $result; echo ' / '; $hex = $result; $key = 6606; $result = ''; $len = strlen($hex); for ($i=0; $i<$len; $i+=2) $result.=sprintf("%s", chr(hexdec(substr($hex,$i,2)))); $firstresult = $result; $result = '0'; for($i=0; $i <= strlen($firstresult)-1; $i++) { $result[$i] = chr(ord($firstresult[$i]) ^ ($key>>8)); $key = (int)ord($firstresult[$i]) + (int)$key; $key = (int)($key * 74102); $key = (int)($key + 12337); } echo $result;
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
2e9eccde0507 / 781657
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.1, 5.0.3 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.9, 5.2.12 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
2e9eccde0568 / 781657
Output for 5.2.10 - 5.2.11
Notice: Uninitialized string offset: 1 in /in/1XZrB on line 7 Notice: Uninitialized string offset: 2 in /in/1XZrB on line 7 Notice: Uninitialized string offset: 3 in /in/1XZrB on line 7 Notice: Uninitialized string offset: 4 in /in/1XZrB on line 7 Notice: Uninitialized string offset: 5 in /in/1XZrB on line 7 2e9eccde0568 / Notice: Uninitialized string offset: 1 in /in/1XZrB on line 42 Notice: Uninitialized string offset: 2 in /in/1XZrB on line 42 Notice: Uninitialized string offset: 3 in /in/1XZrB on line 42 Notice: Uninitialized string offset: 4 in /in/1XZrB on line 42 Notice: Uninitialized string offset: 5 in /in/1XZrB on line 42 781657
Output for 5.0.2
2e9eccdecac8 / 781657

preferences:
273.35 ms | 401 KiB | 383 Q