3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = "https://test.ctpe.net/frontend/GenerateToken"; $data = "SECURITY.SENDER=696a8f0fabffea91517d0eb0a0bf9c33" . "&TRANSACTION.CHANNEL=52275ebaf361f20a76b038ba4c806991" . "&TRANSACTION.MODE=INTEGRATOR_TEST" . "&USER.LOGIN=1143238d620a572a726fe92eede0d1ab" . "&USER.PWD=demo" . "&PAYMENT.TYPE=DB" . "&PRESENTATION.AMOUNT=50.99" . "&PRESENTATION.CURRENCY=EUR"; $params = array('http' => array( 'method' => 'POST', 'content' => $data )); $ctx = stream_context_create($params); $fp = @fopen($url, 'rb', false, $ctx); if (!$fp) { throw new Exception("Problem with $url, $php_errormsg"); } $response = @stream_get_contents($fp); if ($response === false) { throw new Exception("Problem reading data from $url, $php_errormsg"); } print $response
Output for 5.4.0 - 5.4.35
Parse error: syntax error, unexpected end of file in /in/597Q4 on line 26
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/597Q4 on line 26
Process exited with code 255.