3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo gmdate('Y-m-d\TH:i:s\Z'); $created = "2015-08-25T10:45:55Z"; $randomString = array(219,237,93,18,84,210,254,168,120,82,56,138,97,64,219,199,173,111,217,208,167,150,79,50,114,227,40,191,210,188,233,34); $private_key = 'aDknWCcwJEsuNjRpJS52ZnN4Ti1MRDk1M2cyNU5N'; $nonce = hash('sha512', $randomString); $key = base64_decode($private_key); $digest = base64_encode(sha1(base64_decode($nonce) . $created . $key, true)); sprintf('UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"', 'wkstore', $digest, $nonce, $created);
based on GQPNP
Output for 5.6.28, 7.0.20 - 7.2.0
2015-08-31T12:18:54Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.6
2016-05-03T13:09:26Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.5
2016-04-03T01:46:09Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.4
2016-03-10T14:07:44Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.3
2016-03-18T14:45:59Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.2
2016-03-22T20:52:15Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.1
2016-03-24T01:16:42Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 7.0.0
2016-03-27T02:16:05Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.21
2016-05-02T08:20:56Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.20
2016-04-10T00:42:07Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.19
2016-03-07T21:50:57Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.18
2016-03-15T06:43:08Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.17
2016-03-19T18:41:17Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.16
2016-03-28T03:05:21Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.15
2016-03-29T03:57:51Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.14
2016-04-02T06:00:12Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.13
2016-04-15T10:11:18Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.12
2016-04-20T00:31:10Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.11
2016-04-23T07:06:52Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.10
2016-04-25T08:58:10Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.9
2016-04-27T14:04:53Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.6.8
2016-04-29T22:39:14Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.35
2016-05-22T12:46:59Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.34
2016-04-11T02:57:29Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.33
2016-03-09T00:56:06Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.32
2016-03-17T10:12:07Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.31
2016-03-20T21:26:15Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.30
2016-04-01T05:51:20Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.29
2016-04-17T00:30:41Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.28
2016-04-21T03:42:21Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.27
2016-04-22T05:44:13Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.26
2016-04-26T11:37:04Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.25
2016-04-28T18:11:45Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.5.24
2016-05-24T01:13:11Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.45
2015-09-06T14:56:00Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.44
2015-08-31T12:19:05Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.38 - 5.4.43
2015-08-31T12:19:06Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.34 - 5.4.37
2015-08-31T12:19:07Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.28 - 5.4.32
2015-08-31T12:19:08Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.23 - 5.4.27
2015-08-31T12:19:09Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.18 - 5.4.22
2015-08-31T12:19:10Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.14 - 5.4.17
2015-08-31T12:19:11Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.8 - 5.4.13
2015-08-31T12:19:12Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.4.2 - 5.4.7
2015-08-31T12:19:13Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.27 - 5.4.1
2015-08-31T12:19:14Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.21 - 5.3.26
2015-08-31T12:19:15Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.16 - 5.3.20
2015-08-31T12:19:16Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.11 - 5.3.15
2015-08-31T12:19:17Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.7 - 5.3.10
2015-08-31T12:19:18Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.3.0 - 5.3.6
2015-08-31T12:19:19Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.2.13 - 5.2.17
2015-08-31T12:19:20Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.2.7 - 5.2.12
2015-08-31T12:19:21Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.2.1 - 5.2.6
2015-08-31T12:19:22Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.1.2 - 5.2.0
2015-08-31T12:19:23Z Warning: hash() expects parameter 2 to be string, array given in /in/j9Wmi on line 8
Output for 5.0.0 - 5.1.1
2015-08-31T12:19:24Z Fatal error: Call to undefined function hash() in /in/j9Wmi on line 8
Process exited with code 255.
Output for 4.4.9
2015-08-31T12:19:24Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.8
2015-08-31T12:19:25Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8
Process exited with code 255.
Output for 4.3.10 - 4.4.4
2015-08-31T12:19:25Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.9
2015-08-31T12:19:26Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8
Process exited with code 255.
Output for 4.3.1
2015-08-31T12:19:26Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8
Output for 4.3.0
2015-09-06T14:55:59Z Fatal error: Call to undefined function: hash() in /in/j9Wmi on line 8