3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?phperror_reporting(E_ALL);$address = "141.105.121.87";$port = 10000;$mysock = socket_create(AF_INET,SOCK_STREAM, SOL_TCP);socket_bind($mysock, $address,$port);socket_listen($mysock, 5);echo "Server started, acceptingconnections ...\n";$i = 0;while (true) {$client = socket_accept($mysock);$i++;$c_msg = socket_read($client,65536);$a = 61;$b = 53;$n = $a * $b;$m = ($a - 1) * ($b - 1);$e = 19; // encryption key$k = 1;do {$d = (1 + ($k * $m)) / $e;// decryption key$k++;} while (!is_int($d));// explode cipher message tocipher blocks$c = explode(" ", $c_msg);// decipher the cipher blocks and concat them into plain message$p_msg = "";foreach ($c as $x) {$p_msg .= chr(bcmod(bcpow($x,$d), $n));}//$msg = socket_read($client,2048);echo "\n===== Connection # ". $i . " =====\n";echo "\n Decripting Message........\n";echo "\n-----Chiper Message-----\n";echo "\n $c_msg\n";echo "\n -----Plain Message-----\n";echo "\n$p_msg\n";$decript_file=fopen("C:/xampp/htdocs/RSA/hasil_stego_decript.txt", "w");fwrite($decript_file,$p_msg);fclose($decript_file);echo "\nSending response message to client ...";$t = "Thanks. Your connection # is " . $i . ".";socket_write($client, $t,strlen($t));echo "\nMessage sent\n";echo "\n===== End ofconnection # " . $i . " =====\n";}echo "\nClosing sockets...\n";socket_close($client);socket_close($mysock);?>
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected end of file in /in/0SI2h on line 1
Process exited with code 255.