3v4l.org

run code in 300+ PHP versions simultaneously
<?php $env = array( 'token' => 'generickey', 'brand' => 'conversant360', 'macMethod' => 'sha256', 'expire' => '+30 minutes', 'primaryURL' => 'https://new.qualtrics.com/ControlPanel/ssoTest.php?ssotoken=%s', 'secondaryURL' => 'https://new.qualtrics.com/ControlPanel/ssoTest.php?ssotoken=%s', ); $token = $hash = base64_encode( hash_hmac($env['macMethod'], $token, $env['token'], true) ); $token .= '&mac='.$hash; //encrypt the token $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND); echo base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $env['token'], $token, MCRYPT_MODE_ECB,$iv));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $token in /in/4nj5b on line 11 Deprecated: hash_hmac(): Passing null to parameter #2 ($data) of type string is deprecated in /in/4nj5b on line 11 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/4nj5b:14 Stack trace: #0 {main} thrown in /in/4nj5b on line 14
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:
43.26 ms | 401 KiB | 8 Q