3v4l.org

run code in 300+ PHP versions simultaneously
<?php function base16Encode($arg){ $ret = ''; for($i=0; $i < strlen($arg); $i++){ $tmp = ord(substr($arg, $i, 1)); $ret .= dechex($tmp); } return $ret; } function encode($text) { return bin2hex($text); } function decode($base16){ return pack("H*", $base16); } function encrypt($key, $link){ $cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); @mcrypt_generic_init($cp, $key, $key); $enc = mcrypt_generic($cp, $link); mcrypt_generic_deinit($cp); mcrypt_module_close($cp); return $enc; } $key="KEY"; echo $transmitKey = base16Encode($key); echo '\r\n\r\n'; echo decode($transmitKey); $link="URL"; $crypted = base64_encode(encrypt($key, $link)); //echo $crypted;
Output for git.master, git.master_jit, rfc.property-hooks
4b4559\r\n\r\nKEY Fatal error: Uncaught Error: Call to undefined function mcrypt_module_open() in /in/j32O0:22 Stack trace: #0 /in/j32O0(37): encrypt('KEY', 'URL') #1 {main} thrown in /in/j32O0 on line 22
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.77 ms | 401 KiB | 8 Q