3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use GuzzleHttp\Client; define("TOKEN",'quick'); define("SALT",'bax5Oh0oY5e5oleukeDi33chTeek7eeyOhthoh5o8Au9ceisaTuk5koogXaih1uolAegu1ohgtieGha3akohLerei8Ju8lahw1o9SouwoOhsh4iphEj1veiru'); $un = "your.user@digilant.com"; $pw = 'your.pass'; error_log($un); error_log($pw); $client = new Client(); /* @var GuzzleHttp\Psr7\Response $response */ $response = $client->post('http://10.20.10.251/api/login_check', [ 'headers' => [], 'form_params' => [ '_username' => $un, '_password' => $pw ], 'timeout' => 30, 'allow_redirects' => true, ]); // here the body -> must to be converted with json_decode(...,true) var_dump($response->getBody()->getContents());
based on 5MpeP
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Class 'GuzzleHttp\Client' not found in /in/ia6qp:14 Stack trace: #0 {main} thrown in /in/ia6qp on line 14 your.user@digilant.com your.pass
Process exited with code 255.
Output for 5.4.0 - 5.6.21
Fatal error: Class 'GuzzleHttp\Client' not found in /in/ia6qp on line 14 your.user@digilant.com your.pass
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ia6qp on line 17
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/ia6qp on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /in/ia6qp on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' or `'('' in /in/ia6qp on line 3
Process exited with code 255.