3v4l.org

run code in 300+ PHP versions simultaneously
<?php include("vendor/autoload.php"); $subdomain = "subdomain"; $username = "username@domain.com"; $password = "password"; $headers = array('Content-Type' => 'application/json'); $options = array('auth' => array($username, $password)); $newTicket = array( 'ticket' => array( 'subject' => 'New Order', 'external_id' => 180, 'type' => 'task', 'group_id' => 66729, 'collaborator_ids' => array( 24178883 ), 'requester' => array( 'locale_id' => 1, 'name' => 'Test Name', 'email' => 'test@test.com', ), 'comment' => array( 'public' => true, 'body' => "\nThank you for your order.\n\nBelow is a breakdown for you to check and confirm back that everything is exactly as you want.\n\nOnce you are happy we will update this ticket with a Go Live certificate so you know your services are live and you will be billed from this point.\n\n\nYour details:\n\nCustomer: Connect B2B Ltd\nCustomer site: Lucy's Office\nCustomer contact: Lucy Robinson lr@connectb2b.co.uk\nDelivery method: Pre 12 £15.00\nDelivery address: Connect B2B Ltd\r\n12 Melcombe Place\r\nLondon\r\nNW1 6JJ\r\nLondon \r\nNW1 6JJ\nOrder date: 06/06/14\n\nOrder details:\n\nHorizon Cisco SPA 122 VoIP Analogue Phone Adapter £50.00 x 1 12345678901 12 months", ), ) ); $json = json_encode($newTicket); $request = Requests::post('https://{{subdomain}}.zendesk.com/api/v2/tickets.json', $headers, $json, $options); echo '<pre>'; echo $json; print_r($request); echo '</pre>'; ?>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: include(): open_basedir restriction in effect. File(vendor/autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/CG9Aq on line 2 Warning: include(vendor/autoload.php): Failed to open stream: Operation not permitted in /in/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Uncaught Error: Class "Requests" not found in /in/CG9Aq:30 Stack trace: #0 {main} thrown in /in/CG9Aq on line 30
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/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Uncaught Error: Class "Requests" not found in /in/CG9Aq:30 Stack trace: #0 {main} thrown in /in/CG9Aq on line 30
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0, 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/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Uncaught Error: Class 'Requests' not found in /in/CG9Aq:30 Stack trace: #0 {main} thrown in /in/CG9Aq on line 30
Process exited with code 255.
Output for 7.2.29 - 7.2.33, 7.3.12 - 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/CG9Aq on line 2 Warning: include(vendor/autoload.php): failed to open stream: Operation not permitted in /in/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Uncaught Error: Class 'Requests' not found in /in/CG9Aq:30 Stack trace: #0 {main} thrown in /in/CG9Aq on line 30
Process exited with code 255.
Output for 7.1.20, 7.2.6
Warning: include(): open_basedir restriction in effect. File(vendor/autoload.php) is not within the allowed path(s): (/tmp:/in) in /in/CG9Aq on line 2 Warning: include(vendor/autoload.php): failed to open stream: Operation not permitted in /in/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Uncaught Error: Class 'Requests' not found in /in/CG9Aq:30 Stack trace: #0 {main} thrown in /in/CG9Aq on line 30
Process exited with code 255.
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Warning: include(vendor/autoload.php): failed to open stream: No such file or directory in /in/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Class 'Requests' not found in /in/CG9Aq on line 30
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Warning: include(vendor/autoload.php): failed to open stream: No such file or directory in /in/CG9Aq on line 2 Warning: include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Call to undefined function json_encode() in /in/CG9Aq on line 29
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(vendor/autoload.php): failed to open stream: No such file or directory in /in/CG9Aq on line 2 Warning: main(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Call to undefined function json_encode() in /in/CG9Aq on line 29
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: main(vendor/autoload.php): failed to open stream: No such file or directory in /in/CG9Aq on line 2 Warning: main(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Call to undefined function: json_encode() in /in/CG9Aq on line 29
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Warning: main(vendor/autoload.php): failed to open stream: No such file or directory in /in/CG9Aq on line 2 Warning: main(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Call to undefined function: json_encode() in /in/CG9Aq on line 29
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(vendor/autoload.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/CG9Aq on line 2 Warning: main() [http://www.php.net/function.main]: Failed opening 'vendor/autoload.php' for inclusion (include_path='.:') in /in/CG9Aq on line 2 Fatal error: Call to undefined function: json_encode() in /in/CG9Aq on line 29

preferences:
241.24 ms | 402 KiB | 350 Q