3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: include(): open_basedir restriction in effect. File(vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/vbTtu on line 2 Warning: include(vendor/autoload.php): Failed to open stream: Operation not permitted 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 8.0.13
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 7.3.32 - 7.3.33, 7.4.33
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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: include(): open_basedir restriction in effect. File(vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/vbTtu on line 2 Warning: include(vendor/autoload.php): failed to open stream: Operation not permitted 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.5.0 - 5.5.38, 5.6.0 - 5.6.40
Warning: include(): open_basedir restriction in effect. File(vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/vbTtu on line 2 Warning: include(vendor/autoload.php): failed to open stream: Operation not permitted 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.4.0 - 5.4.45
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.

preferences:
272.29 ms | 402 KiB | 376 Q