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"', $this->login, $digest, $nonce, $created);
based on aFNp6
Output for 7.0.20 - 7.2.0
2015-08-31T12:18:32Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.6
2016-05-03T13:09:26Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.5
2016-04-03T01:46:08Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.4
2016-03-10T14:07:45Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.3
2016-03-18T14:46:00Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.2
2016-03-22T20:52:16Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.1
2016-03-24T01:16:43Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 7.0.0
2016-03-27T02:16:06Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Uncaught Error: Using $this when not in object context in /in/GQPNP:11 Stack trace: #0 {main} thrown in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.28
2015-08-31T12:18:32Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.21
2016-05-02T08:20:55Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.20
2016-04-10T00:42:07Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.19
2016-03-07T21:50:58Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.18
2016-03-15T06:43:09Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.17
2016-03-19T18:41:18Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.16
2016-03-28T03:05:22Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.15
2016-03-29T03:57:52Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.14
2016-04-02T06:00:12Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.13
2016-04-15T10:11:18Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.12
2016-04-20T00:31:10Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.11
2016-04-23T07:06:51Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.10
2016-04-25T08:58:10Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.9
2016-04-27T14:04:53Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.6.8
2016-04-29T22:39:14Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.35
2016-05-22T12:46:59Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.34
2016-04-11T02:57:29Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.33
2016-03-09T00:56:07Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.32
2016-03-17T10:12:08Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.31
2016-03-20T21:26:17Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.30
2016-04-01T05:51:20Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.29
2016-04-17T00:30:41Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.28
2016-04-21T03:42:21Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.27
2016-04-22T05:44:13Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.26
2016-04-26T11:37:04Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.25
2016-04-28T18:11:45Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.5.24
2016-05-24T01:13:10Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.45
2015-09-06T14:55:58Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.43 - 5.4.44
2015-08-31T12:18:42Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.37 - 5.4.42
2015-08-31T12:18:43Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.29 - 5.4.36
2015-08-31T12:18:44Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.23 - 5.4.28
2015-08-31T12:18:45Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.17 - 5.4.22
2015-08-31T12:18:46Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.10 - 5.4.16
2015-08-31T12:18:47Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.4.4 - 5.4.9
2015-08-31T12:18:48Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.3.29 - 5.4.3
2015-08-31T12:18:49Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.3.22 - 5.3.28
2015-08-31T12:18:50Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.3.15 - 5.3.21
2015-08-31T12:18:51Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.3.10 - 5.3.14
2015-08-31T12:18:52Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.3.4 - 5.3.9
2015-08-31T12:18:53Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.2.16 - 5.3.3
2015-08-31T12:18:54Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.2.10 - 5.2.15
2015-08-31T12:18:55Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.2.2 - 5.2.9
2015-08-31T12:18:56Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.1.2 - 5.2.1
2015-08-31T12:18:57Z Warning: hash() expects parameter 2 to be string, array given in /in/GQPNP on line 8 Fatal error: Using $this when not in object context in /in/GQPNP on line 11
Process exited with code 255.
Output for 5.0.5 - 5.1.1
2015-08-31T12:18:57Z Fatal error: Call to undefined function hash() in /in/GQPNP on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.4
2015-08-31T12:18:58Z Fatal error: Call to undefined function hash() in /in/GQPNP on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
2015-08-31T12:18:58Z Fatal error: Call to undefined function: hash() in /in/GQPNP on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.4
2015-08-31T12:18:58Z Fatal error: Call to undefined function: hash() in /in/GQPNP on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.1
2015-08-31T12:18:59Z Fatal error: Call to undefined function: hash() in /in/GQPNP on line 8
Process exited with code 255.
Output for 4.3.1
2015-08-31T12:18:59Z Fatal error: Call to undefined function: hash() in /in/GQPNP on line 8
Output for 4.3.0
2015-09-06T14:55:56Z Fatal error: Call to undefined function: hash() in /in/GQPNP on line 8