3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subdomain = "tckts"; $username = "msirianni@zendesk.com/token"; $password = "0TDALUGakEn6oJ23ZaeQnLmjqtqwnLxz6pXnZrxT"; $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>'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KovVD
function name:  (null)
number of ops:  27
compiled vars:  !0 = $subdomain, !1 = $username, !2 = $password, !3 = $headers, !4 = $options, !5 = $newTicket, !6 = $json, !7 = $request
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'tckts'
    3     1        ASSIGN                                                   !1, 'msirianni%40zendesk.com%2Ftoken'
    4     2        ASSIGN                                                   !2, '0TDALUGakEn6oJ23ZaeQnLmjqtqwnLxz6pXnZrxT'
    6     3        ASSIGN                                                   !3, <array>
    7     4        INIT_ARRAY                                       ~12     !1
          5        ADD_ARRAY_ELEMENT                                ~12     !2
          6        INIT_ARRAY                                       ~13     ~12, 'auth'
          7        ASSIGN                                                   !4, ~13
    8     8        ASSIGN                                                   !5, <array>
   28     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !5
         11        DO_ICALL                                         $16     
         12        ASSIGN                                                   !6, $16
   29    13        INIT_STATIC_METHOD_CALL                                  'Requests', 'post'
         14        SEND_VAL_EX                                              'https%3A%2F%2F%7B%7Bsubdomain%7D%7D.zendesk.com%2Fapi%2Fv2%2Ftickets.json'
         15        SEND_VAR_EX                                              !3
         16        SEND_VAR_EX                                              !6
         17        SEND_VAR_EX                                              !4
         18        DO_FCALL                                      0  $18     
         19        ASSIGN                                                   !7, $18
   30    20        ECHO                                                     '%3Cpre%3E'
   31    21        ECHO                                                     !6
   32    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !7
         24        DO_ICALL                                                 
   33    25        ECHO                                                     '%3C%2Fpre%3E'
   34    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.1 ms | 940 KiB | 18 Q