3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accessToken = function(){ $array = array( "foo" => "bar", "bar" => "foo" ); $obj = json_encode($array); $obj = json_decode($obj); return $obj->foo; }; $getInfo = function() use ($accessToken){ $code = $accessToken(); return $code; }; echo $getInfo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BOtnf
function name:  (null)
number of ops:  9
compiled vars:  !0 = $accessToken, !1 = $getInfo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
   15     2        DECLARE_LAMBDA_FUNCTION                          ~4      [1]
          3        BIND_LEXICAL                                             ~4, !0
          4        ASSIGN                                                   !1, ~4
   23     5        INIT_DYNAMIC_CALL                                        !1
          6        DO_FCALL                                      0  $6      
          7        ECHO                                                     $6
          8      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BOtnf
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $array, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   10     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   12     9        FETCH_OBJ_R                                      ~7      !1, 'foo'
         10      > RETURN                                                   ~7
   13    11*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BOtnf
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $accessToken, !1 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   BIND_STATIC                                              !0
   17     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !1, $2
   18     4      > RETURN                                                   !1
   21     5*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1012 KiB | 15 Q