3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $LOGINSERVER_HOST = "217.23.133.119"; $LOGINSERVER_PORT = 28511; function GetAccountRegisterDate($account) { Global $LOGINSERVER_HOST, $LOGINSERVER_PORT; $result = array(); $fp = @fsockopen($LOGINSERVER_HOST, $LOGINSERVER_PORT, $errno, $errstr, 5); if (!$fp) die("Connection to account database failed"); $buf = pack("c", 0x0b); // $buf .= pack("a*x",$account); // account name fwrite($fp, pack("s", (strlen($buf)+2)).$buf); echo $fp; $len = unpack("v", fread($fp, 2)); // size $id = unpack("c", fread($fp, 1)); // id = 0x08 $result = unpack("a*", fread($fp, $len[1] - 3)); // date fclose($fp); return $result[1]; } function tounicode($string) { $rs = ""; for($i = 0; $i < strlen($string); $i++) $rs .= $string[$i].chr(0); return($rs.chr(0).chr(0)); } echo GetAccountRegisterDate('Infernalz');
Output for 4.3.2 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Connection to account database failed
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.3.1

Process exited with code 139.