3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $appId = "16961"; $secret= "1c99b315c7cc4009a9fbce37b885abbc"; $userid = null; $time = gmdate("Y-m-d\TH:i:s"); $unixTime = @strtotime($time."Z"); $signature = hash('sha256', ($userid?$userid:"").$appId.$unixTime.$secret); echo "/auth/get-token?appId={$appId}".($userid?"&userid={$userid}":"")."&timestamp={$time}&signature={$signature}"; echo "\n\n"; $token = "0_16961_1409345258_2_ab982eea090d038b6f0ddc3aab33f6a8996c9a0470bf2b3527f1dabdd5d38a71"; echo "&token=" .$token ."&hash=" .hash('sha256', $token .$secret);
based on YadTP
Output for 5.1.2 - 7.1.0
/auth/get-token?appId=16961&timestamp=2014-08-25T20:58:43&signature=cf78505218db397b4ac8744e15eeb7bfc302fdf22f883771d92b394064b1be5f &token=0_16961_1409345258_2_ab982eea090d038b6f0ddc3aab33f6a8996c9a0470bf2b3527f1dabdd5d38a71&hash=ac5058a5603a998a4390feb1f6008a53365d46a757c85cd89768d27808881dbd
Output for 5.0.0 - 5.1.1
Fatal error: Call to undefined function hash() in /in/v7Fdr on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hash() in /in/v7Fdr on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hash() in /in/v7Fdr on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hash() in /in/v7Fdr on line 8