3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dispatcher = new Dispatcher($dispatcher = new Dispatcher('https://pg.eet.cz:443/eet/services/EETServiceSOAP/v3'); $dispatcher->trace = TRUE; // Example receipt $r = new Receipt(); $r->uuid_zpravy = 'b3a09b52-7c87-4014-a496-4c7a53cf9120'; $r->dic_popl = 'CZ72080043'; $r->id_provoz = '181'; $r->id_pokl = '1'; $r->porad_cis = '1'; $r->dat_trzby = new \DateTime(); $r->celk_trzba = 1000; // Valid response should be returned echo '<h2>---VALID REQUEST---</h2>'; try { $fik = $dispatcher->send($r); // Send request echo sprintf('<b>Returned FIK code: %s</b><br />', $fik); // See response - should be returned } catch (ServerException $e) { var_dump($e); // See exception } catch (\Exception $e) { var_dump($e); // Fatal error }
based on sMTJL
Output for 7.0.0 - 7.2.9
Parse error: syntax error, unexpected ';', expecting ',' or ')' in /in/0rd5s on line 2
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: syntax error, unexpected ';', expecting ')' in /in/0rd5s:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.12.14 - 3.21.3
Fatal error: Uncaught Error: syntax error, unexpected ';', expecting ')' in /in/0rd5s:2 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ';' in /in/0rd5s on line 2
Process exited with code 255.