3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php include("vendor/autoload.php"); use Zendesk\API\Client as ZendeskAPI; $subdomain = "z3nz3ndesk850"; $username = "ameehan@zendesk.com"; $token = "NthYIpWqTmbR7fgxPNFafqm0xk3gAVLiD4heUyWD"; // replace this with your token $client = new ZendeskAPI($subdomain, $username); $client->setAuth('token', $token); $newTicket = $client->tickets()->create([ 'subject' => 'Zendesk Test', 'comment' => [ 'body' => 'This is a Zendesk test.' . 'Please disregard.' ], 'priority' => 'normal' ]); print_r($newTicket); ?>
Output for 7.0.0 - 7.2.0
Warning: include(vendor/autoload.php): failed to open stream: No such file or directory in /in/vbTtu on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/vbTtu on line 2 Fatal error: Uncaught Error: Class 'Zendesk\API\Client' not found in /in/vbTtu:9 Stack trace: #0 {main} thrown in /in/vbTtu on line 9
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Warning: include(vendor/autoload.php): failed to open stream: No such file or directory in /in/vbTtu on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/vbTtu on line 2 Fatal error: Class 'Zendesk\API\Client' not found in /in/vbTtu on line 9
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/vbTtu on line 12
Process exited with code 255.