3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://timsdevorg-developer-edition.na24.force.com/services/apexrest/cms/ocmsrest/'; $fields = array( 'service' => 'OrchestraRenderingAPI', 'apiVersion' => '5.0', 'action' => 'getRenderedContent', 'renderingRequest' => array( 'renderType' => 'originId', 'siteName' => 'OCMSCommunity', 'parameters' => array( 'renderType' => 'originId', ), 'listParameters' => array( 'contentLayouts' => array( 'CustomHtml', ), 'originIds' => array( 'a0F1a000002JDsVEAW', ), ), ), ); $fields_string = ''; foreach ($fields as $key => $value) { if (!is_array($value)) { $fields_string .= $key . '=' . $value . '&'; } else { $fields_string .= $key . '=' . json_encode($value) . '&'; } } $fields_string = rtrim($fields_string, '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result); $renderings = json_decode($obj->responseObject); foreach ($renderings as $rendering) { if (is_array($rendering)) { foreach ($rendering as $render) { foreach ($render->renderMap as $renderMap) { echo htmlspecialchars($renderMap); } } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 79, Position 2 = 96
Branch analysis from position: 79
2 jumps found. (Code = 78) Position 1 = 80, Position 2 = 96
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 82, Position 2 = 95
Branch analysis from position: 82
2 jumps found. (Code = 77) Position 1 = 83, Position 2 = 94
Branch analysis from position: 83
2 jumps found. (Code = 78) Position 1 = 84, Position 2 = 94
Branch analysis from position: 84
2 jumps found. (Code = 77) Position 1 = 86, Position 2 = 92
Branch analysis from position: 86
2 jumps found. (Code = 78) Position 1 = 87, Position 2 = 92
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 92
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 92
Branch analysis from position: 94
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Branch analysis from position: 94
Branch analysis from position: 95
Branch analysis from position: 96
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 96
Branch analysis from position: 22
filename:       /in/LX5pZ
function name:  (null)
number of ops:  98
compiled vars:  !0 = $url, !1 = $fields, !2 = $fields_string, !3 = $value, !4 = $key, !5 = $ch, !6 = $result, !7 = $obj, !8 = $renderings, !9 = $rendering, !10 = $render, !11 = $renderMap
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Ftimsdevorg-developer-edition.na24.force.com%2Fservices%2Fapexrest%2Fcms%2Focmsrest%2F'
    4     1        ASSIGN                                                   !1, <array>
   25     2        ASSIGN                                                   !2, ''
   27     3      > FE_RESET_R                                       $15     !1, ->22
          4    > > FE_FETCH_R                                       ~16     $15, !3, ->22
          5    >   ASSIGN                                                   !4, ~16
   28     6        TYPE_CHECK                                  128  ~18     !3
          7        BOOL_NOT                                         ~19     ~18
          8      > JMPZ                                                     ~19, ->14
   29     9    >   CONCAT                                           ~20     !4, '%3D'
         10        CONCAT                                           ~21     ~20, !3
         11        CONCAT                                           ~22     ~21, '%26'
         12        ASSIGN_OP                                     8          !2, ~22
         13      > JMP                                                      ->21
   31    14    >   CONCAT                                           ~24     !4, '%3D'
         15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $25     
         18        CONCAT                                           ~26     ~24, $25
         19        CONCAT                                           ~27     ~26, '%26'
         20        ASSIGN_OP                                     8          !2, ~27
   27    21    > > JMP                                                      ->4
         22    >   FE_FREE                                                  $15
   35    23        INIT_FCALL                                               'rtrim'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 '%26'
         26        DO_ICALL                                         $29     
         27        ASSIGN                                                   !2, $29
   37    28        INIT_FCALL_BY_NAME                                       'curl_init'
         29        DO_FCALL                                      0  $31     
         30        ASSIGN                                                   !5, $31
   38    31        INIT_FCALL_BY_NAME                                       'curl_setopt'
         32        SEND_VAR_EX                                              !5
         33        FETCH_CONSTANT                                   ~33     'CURLOPT_URL'
         34        SEND_VAL_EX                                              ~33
         35        SEND_VAR_EX                                              !0
         36        DO_FCALL                                      0          
   39    37        INIT_FCALL_BY_NAME                                       'curl_setopt'
         38        SEND_VAR_EX                                              !5
         39        FETCH_CONSTANT                                   ~35     'CURLOPT_SSL_VERIFYPEER'
         40        SEND_VAL_EX                                              ~35
         41        SEND_VAL_EX                                              <false>
         42        DO_FCALL                                      0          
   40    43        INIT_FCALL_BY_NAME                                       'curl_setopt'
         44        SEND_VAR_EX                                              !5
         45        FETCH_CONSTANT                                   ~37     'CURLOPT_RETURNTRANSFER'
         46        SEND_VAL_EX                                              ~37
         47        SEND_VAL_EX                                              <true>
         48        DO_FCALL                                      0          
   41    49        INIT_FCALL_BY_NAME                                       'curl_setopt'
         50        SEND_VAR_EX                                              !5
         51        FETCH_CONSTANT                                   ~39     'CURLOPT_POST'
         52        SEND_VAL_EX                                              ~39
         53        COUNT                                            ~40     !1
         54        SEND_VAL_EX                                              ~40
         55        DO_FCALL                                      0          
   42    56        INIT_FCALL_BY_NAME                                       'curl_setopt'
         57        SEND_VAR_EX                                              !5
         58        FETCH_CONSTANT                                   ~42     'CURLOPT_POSTFIELDS'
         59        SEND_VAL_EX                                              ~42
         60        SEND_VAR_EX                                              !2
         61        DO_FCALL                                      0          
   43    62        INIT_FCALL_BY_NAME                                       'curl_exec'
         63        SEND_VAR_EX                                              !5
         64        DO_FCALL                                      0  $44     
         65        ASSIGN                                                   !6, $44
   44    66        INIT_FCALL_BY_NAME                                       'curl_close'
         67        SEND_VAR_EX                                              !5
         68        DO_FCALL                                      0          
   46    69        INIT_FCALL                                               'json_decode'
         70        SEND_VAR                                                 !6
         71        DO_ICALL                                         $47     
         72        ASSIGN                                                   !7, $47
   47    73        INIT_FCALL                                               'json_decode'
         74        FETCH_OBJ_R                                      ~49     !7, 'responseObject'
         75        SEND_VAL                                                 ~49
         76        DO_ICALL                                         $50     
         77        ASSIGN                                                   !8, $50
   49    78      > FE_RESET_R                                       $52     !8, ->96
         79    > > FE_FETCH_R                                               $52, !9, ->96
   50    80    >   TYPE_CHECK                                  128          !9
         81      > JMPZ                                                     ~53, ->95
   51    82    > > FE_RESET_R                                       $54     !9, ->94
         83    > > FE_FETCH_R                                               $54, !10, ->94
   52    84    >   FETCH_OBJ_R                                      ~55     !10, 'renderMap'
         85      > FE_RESET_R                                       $56     ~55, ->92
         86    > > FE_FETCH_R                                               $56, !11, ->92
   53    87    >   INIT_FCALL                                               'htmlspecialchars'
         88        SEND_VAR                                                 !11
         89        DO_ICALL                                         $57     
         90        ECHO                                                     $57
   52    91      > JMP                                                      ->86
         92    >   FE_FREE                                                  $56
   51    93      > JMP                                                      ->83
         94    >   FE_FREE                                                  $54
   49    95    > > JMP                                                      ->79
         96    >   FE_FREE                                                  $52
   57    97      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.83 ms | 1404 KiB | 21 Q