3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $targetUri = strtolower(rawurlencode(strtolower($uri))); $expires = time(); $expiresInMins = 60; $week = 60*60*24*7; $expires = $expires + $week; $toSign = $targetUri . "\n" . $expires; $signature = rawurlencode(base64_encode(hash_hmac('sha256', $toSign, $sasKeyValue, TRUE))); $token = "SharedAccessSignature sr=" . $targetUri . "&sig=" . $signature . "&se=" . $expires . "&skn=" . $sasKeyName;
Output for 5.6.0 - 5.6.30, 7.0.19 - 7.0.20, 7.1.5 - 7.3.0rc3
Notice: Undefined variable: uri in /in/YUX68 on line 3 Notice: Undefined variable: sasKeyValue in /in/YUX68 on line 10 Notice: Undefined variable: sasKeyName in /in/YUX68 on line 12
Output for 7.0.0 - 7.0.18, 7.1.0 - 7.1.4
Notice: Undefined variable: uri in /in/YUX68 on line 3 Notice: Undefined variable: sasKeyValue in /in/YUX68 on line 9 Notice: Undefined variable: sasKeyName in /in/YUX68 on line 12
Output for hhvm-3.15.4
Notice: Undefined variable: uri in /in/YUX68 on line 3 Warning: strtolower() expects parameter 1 to be string, null given in /in/YUX68 on line 3 Warning: rawurlencode() expects parameter 1 to be string, null given in /in/YUX68 on line 3 Warning: strtolower() expects parameter 1 to be string, null given in /in/YUX68 on line 3 Notice: Undefined variable: sasKeyValue in /in/YUX68 on line 10 Fatal error: Uncaught TypeError: Argument 3 passed to hash_init() must be an instance of string, null given in /in/YUX68:10 Stack trace: #0 (): hash_init() #1 /in/YUX68(10): hash_hmac() #2 {main}
Process exited with code 255.