3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 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
Connection to account database failed
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
260.57 ms | 401 KiB | 326 Q