3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* dynamic - interactive design - html5 */ $url = "https://editor.pixartprinting.com/services/flexdoc.asmx?WSDL"; // create new SoapClient object $edoc1 = new SoapClient($url,array('trace' => 1, 'exception' => 0, 'cache_wsdl' => 0)); $user_new = array(); $docCode = "398244e4-2343-4af8-a3e7-eeb70459ae93"; $docPwd = "9adccda9-4a8c-4a7a-9725-9ba5d259c381"; // initialize session by startDocSession $session_dynamic = $edoc1->startDocSession(array("docCode" => $docCode, "docPwd" => $docPwd)); // and save sessionId $session_id = $session_dynamic->startDocSessionResult->docSession; // get info by getCurrentSession $session_info = $edoc1->getCurrentSession(array("docSessionID"=> $session_id)); $user_info = $session_info->getCurrentSessionResult; // print get background info //print "<h3>print get background info ($session_id)</h3><pre>"; print_r($user_info); print "</pre>"; echo "<hr>"; // modify elementValue about first element $nome_file = "http://apr.pixartprinting.com/test/test.jpg"; $user_new[0] = (object) array( "elementName" => "background", "elementValue" => $nome_file, "imageData" => base64_encode(file_get_contents($nome_file)) ); $user_new = (object) $user_new; // print userEntries object print "<h3>userEntries object</h3>"; var_dump($user_new); // update data by updateCurrentSession using same sessionId and element modified // print response about update data print "<h3>print response about update data ($session_id)</h3>"; var_dump($edoc1->updateCurrentSession(array("docSessionID" => $session_id, "userValues"=> $user_new))); echo "<hr>"; // get info by getCurrentSession using same sessionId $session_info = $edoc1->getCurrentSession(array("docSessionID"=> $session_id)); // print get background info print "<h3>print get background info ($session_id)</h3><pre>"; print_r($user_info->inputForm->formElement[0]); print "</pre>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P3Tha
function name:  (null)
number of ops:  75
compiled vars:  !0 = $url, !1 = $edoc1, !2 = $user_new, !3 = $docCode, !4 = $docPwd, !5 = $session_dynamic, !6 = $session_id, !7 = $session_info, !8 = $user_info, !9 = $nome_file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Feditor.pixartprinting.com%2Fservices%2Fflexdoc.asmx%3FWSDL'
    6     1        NEW                                              $11     'SoapClient'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              <array>
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $11
    8     6        ASSIGN                                                   !2, <array>
    9     7        ASSIGN                                                   !3, '398244e4-2343-4af8-a3e7-eeb70459ae93'
   10     8        ASSIGN                                                   !4, '9adccda9-4a8c-4a7a-9725-9ba5d259c381'
   13     9        INIT_METHOD_CALL                                         !1, 'startDocSession'
         10        INIT_ARRAY                                       ~17     !3, 'docCode'
         11        ADD_ARRAY_ELEMENT                                ~17     !4, 'docPwd'
         12        SEND_VAL_EX                                              ~17
         13        DO_FCALL                                      0  $18     
         14        ASSIGN                                                   !5, $18
   16    15        FETCH_OBJ_R                                      ~20     !5, 'startDocSessionResult'
         16        FETCH_OBJ_R                                      ~21     ~20, 'docSession'
         17        ASSIGN                                                   !6, ~21
   19    18        INIT_METHOD_CALL                                         !1, 'getCurrentSession'
         19        INIT_ARRAY                                       ~23     !6, 'docSessionID'
         20        SEND_VAL_EX                                              ~23
         21        DO_FCALL                                      0  $24     
         22        ASSIGN                                                   !7, $24
   21    23        FETCH_OBJ_R                                      ~26     !7, 'getCurrentSessionResult'
         24        ASSIGN                                                   !8, ~26
   25    25        ECHO                                                     '%3Chr%3E'
   28    26        ASSIGN                                                   !9, 'http%3A%2F%2Fapr.pixartprinting.com%2Ftest%2Ftest.jpg'
   30    27        INIT_ARRAY                                       ~30     'background', 'elementName'
   31    28        ADD_ARRAY_ELEMENT                                ~30     !9, 'elementValue'
   32    29        INIT_FCALL                                               'base64_encode'
         30        INIT_FCALL                                               'file_get_contents'
         31        SEND_VAR                                                 !9
         32        DO_ICALL                                         $31     
         33        SEND_VAR                                                 $31
         34        DO_ICALL                                         $32     
         35        ADD_ARRAY_ELEMENT                                ~30     $32, 'imageData'
         36        CAST                                          8  ~33     ~30
   29    37        ASSIGN_DIM                                               !2, 0
   32    38        OP_DATA                                                  ~33
   34    39        CAST                                          8  ~34     !2
         40        ASSIGN                                                   !2, ~34
   37    41        ECHO                                                     '%3Ch3%3EuserEntries+object%3C%2Fh3%3E'
   38    42        INIT_FCALL                                               'var_dump'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                                 
   42    45        ROPE_INIT                                     3  ~38     '%3Ch3%3Eprint+response+about+update+data+%28'
         46        ROPE_ADD                                      1  ~38     ~38, !6
         47        ROPE_END                                      2  ~37     ~38, '%29%3C%2Fh3%3E'
         48        ECHO                                                     ~37
   43    49        INIT_FCALL                                               'var_dump'
         50        INIT_METHOD_CALL                                         !1, 'updateCurrentSession'
         51        INIT_ARRAY                                       ~40     !6, 'docSessionID'
         52        ADD_ARRAY_ELEMENT                                ~40     !2, 'userValues'
         53        SEND_VAL_EX                                              ~40
         54        DO_FCALL                                      0  $41     
         55        SEND_VAR                                                 $41
         56        DO_ICALL                                                 
   44    57        ECHO                                                     '%3Chr%3E'
   47    58        INIT_METHOD_CALL                                         !1, 'getCurrentSession'
         59        INIT_ARRAY                                       ~43     !6, 'docSessionID'
         60        SEND_VAL_EX                                              ~43
         61        DO_FCALL                                      0  $44     
         62        ASSIGN                                                   !7, $44
   50    63        ROPE_INIT                                     3  ~47     '%3Ch3%3Eprint+get+background+info+%28'
         64        ROPE_ADD                                      1  ~47     ~47, !6
         65        ROPE_END                                      2  ~46     ~47, '%29%3C%2Fh3%3E%3Cpre%3E'
         66        ECHO                                                     ~46
         67        INIT_FCALL                                               'print_r'
         68        FETCH_OBJ_R                                      ~49     !8, 'inputForm'
         69        FETCH_OBJ_R                                      ~50     ~49, 'formElement'
         70        FETCH_DIM_R                                      ~51     ~50, 0
         71        SEND_VAL                                                 ~51
         72        DO_ICALL                                                 
         73        ECHO                                                     '%3C%2Fpre%3E'
   51    74      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.03 ms | 1400 KiB | 21 Q