3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.6.28, 7.0.0 - 7.1.0
2e9eccde0507 / 781657
Output for 4.3.0 - 5.0.1, 5.0.3 - 5.2.9, 5.2.12 - 5.4.45, hhvm-3.10.0 - 3.12.0
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