3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo gmdate('Y-m-d\TH:i:s\Z'); $created = "2015-08-25T10:45:55Z"; $bytes = 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); $randomString = vsprintf(str_repeat('%c', count($bytes)), $bytes); $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);
Output for 5.6.28, 7.0.20, 7.1.0 - 7.1.33, 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
2015-08-31T12:21:28Z
Output for 7.0.6
2016-05-03T13:09:19Z
Output for 7.0.5
2016-04-03T01:46:03Z
Output for 7.0.4
2016-03-10T14:07:42Z
Output for 7.0.3
2016-03-18T14:45:58Z
Output for 7.0.2
2016-03-22T20:52:14Z
Output for 7.0.1
2016-03-24T01:16:41Z
Output for 7.0.0
2016-03-27T02:16:10Z
Output for 5.6.21
2016-05-02T08:20:49Z
Output for 5.6.20
2016-04-10T00:42:01Z
Output for 5.6.19
2016-03-07T21:50:56Z
Output for 5.6.18
2016-03-15T06:43:07Z
Output for 5.6.17
2016-03-19T18:41:15Z
Output for 5.6.16
2016-03-28T03:05:26Z
Output for 5.6.15
2016-03-29T03:57:55Z
Output for 5.6.14
2016-04-02T06:00:06Z
Output for 5.6.13
2016-04-15T10:11:11Z
Output for 5.6.12
2016-04-20T00:31:04Z
Output for 5.6.11
2016-04-23T07:06:35Z
Output for 5.6.10
2016-04-25T08:58:04Z
Output for 5.6.9
2016-04-27T14:04:46Z
Output for 5.6.8
2016-04-29T22:39:07Z
Output for 5.5.35
2016-05-22T12:46:51Z
Output for 5.5.34
2016-04-11T02:57:22Z
Output for 5.5.33
2016-03-09T00:56:05Z
Output for 5.5.32
2016-03-17T10:12:06Z
Output for 5.5.31
2016-03-20T21:26:14Z
Output for 5.5.30
2016-04-01T05:51:13Z
Output for 5.5.29
2016-04-17T00:30:34Z
Output for 5.5.28
2016-04-21T03:42:14Z
Output for 5.5.27
2016-04-22T05:44:06Z
Output for 5.5.26
2016-04-26T11:36:58Z
Output for 5.5.25
2016-04-28T18:11:38Z
Output for 5.5.24
2016-05-24T01:13:02Z
Output for 5.4.45
2015-09-06T14:55:50Z
Output for 5.4.44
2015-08-31T12:21:48Z
Output for 5.4.38 - 5.4.43
2015-08-31T12:21:50Z
Output for 5.4.30 - 5.4.37
2015-08-31T12:21:51Z
Output for 5.4.22 - 5.4.29
2015-08-31T12:21:52Z
Output for 5.4.14 - 5.4.21
2015-08-31T12:21:53Z
Output for 5.4.6 - 5.4.13
2015-08-31T12:21:54Z
Output for 5.3.27 - 5.3.29, 5.4.0 - 5.4.5
2015-08-31T12:21:55Z
Output for 5.3.19 - 5.3.26
2015-08-31T12:21:56Z
Output for 5.3.8 - 5.3.18
2015-08-31T12:21:57Z
Output for 5.2.16 - 5.2.17, 5.3.0 - 5.3.7
2015-08-31T12:21:58Z
Output for 5.2.3 - 5.2.15
2015-08-31T12:21:59Z
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.2
2015-08-31T12:22:00Z
Output for 5.0.2 - 5.0.5, 5.1.0 - 5.1.1
2015-08-31T12:22:00Z Fatal error: Call to undefined function hash() in /in/UNe8m on line 9
Process exited with code 255.
Output for 5.0.0 - 5.0.1
2015-08-31T12:22:01Z Fatal error: Call to undefined function hash() in /in/UNe8m on line 9
Process exited with code 255.
Output for 4.4.5 - 4.4.9
2015-08-31T12:22:01Z Fatal error: Call to undefined function: hash() in /in/UNe8m on line 9
Process exited with code 255.
Output for 4.3.8 - 4.3.11, 4.4.0 - 4.4.4
2015-08-31T12:22:01Z Fatal error: Call to undefined function: hash() in /in/UNe8m on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.7
2015-08-31T12:22:02Z Fatal error: Call to undefined function: hash() in /in/UNe8m on line 9
Process exited with code 255.
Output for 4.3.1
2015-08-31T12:22:02Z Fatal error: Call to undefined function: hash() in /in/UNe8m on line 9
Output for 4.3.0
2015-09-06T14:55:49Z Fatal error: Call to undefined function: hash() in /in/UNe8m on line 9

preferences:
288.29 ms | 401 KiB | 341 Q