3v4l.org

run code in 300+ PHP versions simultaneously
<?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 }
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
Parse error: syntax error, unexpected ';', expecting ',' or ')' in /in/0rd5s on line 2
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.

preferences:
163.14 ms | 1444 KiB | 7 Q