3v4l.org

run code in 300+ PHP versions simultaneously
<?php $leg_id='NCL000018'; $request_url = "http://openstates.org/api/v1/legislators/$leg_id/"; $ch = curl_init($request_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $legislator = json_decode($result,true); print_r($legislator);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2Kjs9
function name:  (null)
number of ops:  37
compiled vars:  !0 = $leg_id, !1 = $request_url, !2 = $ch, !3 = $result, !4 = $httpCode, !5 = $legislator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'NCL000018'
    5     1        ROPE_INIT                                     3  ~8      'http%3A%2F%2Fopenstates.org%2Fapi%2Fv1%2Flegislators%2F'
          2        ROPE_ADD                                      1  ~8      ~8, !0
          3        ROPE_END                                      2  ~7      ~8, '%2F'
          4        ASSIGN                                                   !1, ~7
    6     5        INIT_FCALL_BY_NAME                                       'curl_init'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $11     
          8        ASSIGN                                                   !2, $11
    7     9        INIT_FCALL_BY_NAME                                       'curl_setopt'
         10        SEND_VAR_EX                                              !2
         11        FETCH_CONSTANT                                   ~13     'CURLOPT_RETURNTRANSFER'
         12        SEND_VAL_EX                                              ~13
         13        SEND_VAL_EX                                              1
         14        DO_FCALL                                      0          
    8    15        INIT_FCALL_BY_NAME                                       'curl_exec'
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0  $15     
         18        ASSIGN                                                   !3, $15
    9    19        INIT_FCALL_BY_NAME                                       'curl_getinfo'
         20        SEND_VAR_EX                                              !2
         21        FETCH_CONSTANT                                   ~17     'CURLINFO_HTTP_CODE'
         22        SEND_VAL_EX                                              ~17
         23        DO_FCALL                                      0  $18     
         24        ASSIGN                                                   !4, $18
   10    25        INIT_FCALL_BY_NAME                                       'curl_close'
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0          
   11    28        INIT_FCALL                                               'json_decode'
         29        SEND_VAR                                                 !3
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $21     
         32        ASSIGN                                                   !5, $21
   12    33        INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !5
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.57 ms | 1396 KiB | 17 Q