3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 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
/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.0.5, 5.1.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.3.11, 4.4.0 - 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

preferences:
237.54 ms | 401 KiB | 368 Q